Let's Do DevOps

Let's Do DevOps

Share this post

Let's Do DevOps
Let's Do DevOps
šŸ”„Building a Teams Bot with AI Capabilities - Part 1 - Azure Bot + App Registration w/ Delegated OAuth2 Token SupportšŸ”„
Copy link
Facebook
Email
Notes
More

šŸ”„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

Kyler Middleton's avatar
Kyler Middleton
May 20, 2025
āˆ™ Paid

Share this post

Let's Do DevOps
Let's Do DevOps
šŸ”„Building a Teams Bot with AI Capabilities - Part 1 - Azure Bot + App Registration w/ Delegated OAuth2 Token SupportšŸ”„
Copy link
Facebook
Email
Notes
More
Share

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

  • Part 2: Register Bot in Teams with Teams Developer Portal

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’s a lot going on here! We’re just going to get a bot registered in Teams for now. The other stuff will be next.

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!

https://github.com/KyMidd/TeamsAIBot

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.

Already a paid subscriber? Sign in
Ā© 2025 Kyler Middleton
Privacy āˆ™ Terms āˆ™ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Copy link
Facebook
Email
Notes
More