š„Building a Teams Bot with AI Capabilities - Part 1 - Azure Bot + App Registration w/ Delegated OAuth2 Token Supportš„
aka, the points don't matter and all the documentation is wrong
This blog series focuses on presenting complex DevOps projects as simple and approachable via plain language and lots of pictures. You can do it!
These articles are supported by readers, please consider subscribing to support me writing more of these articles <3 :)
This article is part of a series of articles, because 1 article would be absolutely massive.
Part 1 (this article!): Create an Azure Bot and App Registration
Hey all!
Now that the Slack āVeraā bot is about done, Iām looking for a big meaty new project. And one just so happened to land on my desk - bringing Vera to Teams. I assumed this project would only take a couple of hours - after all, how hard could it be to bring something Iāve already built and know well to Teams?
LOL
Turns out, the permissions in Teams are, um⦠lets go with INCREDIBLY CHALLENGING. Not to mention our admin insists on using Delegated Permissions rather than direct āApplicationā permissions, meaning weāre relying on Oauth2 tokens across 2 different calls, meaning we need to establish some state for our previously entirely stateless application (I built this with DynamoDB tables, and itās working great!).

There is a LOT to cover, even if youāve already read the entire āSlack Botā series. Much of it will be similar later on, but these earlier pieces where weāre directly interfacing with Teams will be entirely different.
In case you havenāt the point of this series is to establish how to build an entirely private GenAI tool in your Teams instance. Because you donāt want your users uploading your sensitive corporate docs to ChatGPT so they can write their summary emails faster, right?
Okay, I really really want to talk about all the cool API stuff I built, and the DynamoDB tables I built to establish stateful behavior across an entirely lambda-based stateless app, but we need to start at the beginning, not least because the process is unintuitive and the documentation is largely incorrect.
Lets do it.
If you donāt care about reading how we built it, and would rather just read the code, itās open-sourced here. Happy building!
Keep reading with a 7-day free trial
Subscribe to Let's Do DevOps to keep reading this post and get 7 days of free access to the full post archives.