Skip to content

Commit c0cf34e

Browse files
committed
Update add-authentication.md
1 parent 2ab5765 commit c0cf34e

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

msteams-platform/bots/how-to/authentication/add-authentication.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ title: OAuth 2.0 Bot Authentication with Azure
33
description: Learn how to enable authentication using third-party provider to a bot app in Teams using Entra ID. Learn to create and register bot resource group and service plan.
44
ms.topic: how-to
55
ms.localizationpriority: high
6-
ms.date: 04/09/2026
6+
ms.date: 04/14/2026
77
---
88

99
# Add authentication to your Teams bot
1010

11-
You can create bots in Microsoft Teams that access resources on behalf of the user, such as a mail service. You can use Teams SDK authentication, based on OAuth 2.0. This method makes it easier to develop a bot that can use authentication tokens based on the user's credentials. The key is the use of **identity providers**.
11+
You can create bots in Microsoft Teams that access resources on behalf of users (such as a mail service) by using Teams SDK authentication based on OAuth 2.0. This method makes it easier to develop a bot that can use authentication tokens based on the user's credentials. The key is the use of **identity providers**.
1212

1313
OAuth 2.0 is an open standard for authentication and authorization used by Microsoft Entra ID and many other identity providers. A basic understanding of OAuth 2.0 is a prerequisite for working with authentication in Teams.
1414

1515
See [OAuth 2 Simplified](https://aka.ms/oauth2-simplified) for a basic understanding, and [OAuth 2.0](https://oauth.net/2/) for the complete specification.
1616

1717
In this article you'll learn:
1818

19-
- **How to create an authentication-enabled bot**. Use [cs-auth-sample][teams-bot-auth-quickstart-cs] to handle user sign-in credentials and the generating the authentication token.
20-
- **How to deploy the bot to Azure and associate it with an identity provider**. The provider issues a token based on user sign-in credentials. The bot can use the token to access resources, such as a mail service, which require authentication.
21-
- **How to integrate the bot within Microsoft Teams**. Once the bot is integrated, you can sign in and exchange messages with it in a chat.
19+
- **How to create an authentication-enabled bot**: Use [cs-auth-sample][teams-bot-auth-quickstart-cs] to handle user sign-in credentials and generating the authentication token.
20+
- **How to deploy the bot to Azure and associate it with an identity provider**: The provider issues a token based on user sign-in credentials. The bot can use the token to access resources, such as a mail service, which requires authentication.
21+
- **How to integrate the bot within Microsoft Teams**: Once the bot is integrated, you can sign in and exchange messages with it in a chat.
2222

2323
## Prerequisites
2424

@@ -88,7 +88,10 @@ The Azure Bot resource registration registers your web service as a bot with the
8888
1. Select **Type of App** as **User-Assigned Managed Identity** or **Single Tenant** for **Microsoft App ID**.
8989

9090
>[!IMPORTANT]
91-
> The **Multi Tenant** bot type in **Azure Bot Service** is deprecated. Existing Multi Tenant bots continue to work for now.</br> All new bot registrations must either use the **Single Tenant** bot type or the **User-Assigned Managed Identity** type.</br> When registering your Entra app in Azure portal, you can still select the **Accounts in any organizational directory (Multi Tenant)** option. This enables your bot to work across multiple tenants, even outside the tenant where the app is registered, when using one of the supported bot types.</br> In all cases, the **TENANT_ID** must be set to the **Tenant ID of the Azure tenant where the Microsoft Entra ID app is registered**.
91+
> The **Multi Tenant** bot type in **Azure Bot Service** is deprecated. Existing Multi Tenant bots continue to work for now.
92+
> All new bot registrations must either use the **Single Tenant** bot type or the **User-Assigned Managed Identity** type.
93+
> When registering your Entra app in Azure portal, you can still select the **Accounts in any organizational directory (Multi Tenant)** option. This enables your bot to work across multiple tenants, even outside the tenant where the app is registered, when using one of the supported bot types.
94+
> In all cases, the **TENANT_ID** must be set to the **Tenant ID of the Azure tenant where the Microsoft Entra ID app is registered**.
9295
9396
:::image type="content" source="../../../assets/images/adaptive-cards/single-tenant.png" alt-text="Screenshot shows how to select multitenant for Microsoft AppID.":::
9497

@@ -98,7 +101,7 @@ The Azure Bot resource registration registers your web service as a bot with the
98101

99102
1. If the validation passes, select **Create**.
100103

101-
Azure provisions your bot in a few moments.
104+
Azure provisions your bot.
102105

103106
:::image type="content" source="../../../assets/images/adaptive-cards/validation-pane.png" alt-text="Screenshot shows how Azure bot validation passes.":::
104107

@@ -120,7 +123,7 @@ To create client secret:
120123

121124
:::image type="content" source="~/assets/images/manage-bot-label.png" alt-text="Screenshot shows how to create and manage a bot.":::
122125

123-
1. In the **Client secrets** section, select **New client secret**.**Add a client secret** window appears.
126+
1. In the **Client secrets** section, select **New client secret**. **Add a client secret** window appears.
124127

125128
:::image type="content" source="../../../assets/images/meetings-side-panel/newclientsecret.PNG" alt-text="Screenshot shows how to create new client secret.":::
126129

@@ -263,7 +266,7 @@ You need an identity provider for authentication. In this procedure, you use a M
263266
1. Select the connection entry to open the connection you created.
264267
1. Select **Test Connection** at the top of the **Service Provider Connection Setting** panel.
265268
1. For the first time, it opens a new browser window asking you to select an account. Select the one you want to use.
266-
1. Next, allow to the identity provider to use your data (credentials). The following image is an example:
269+
1. Next, allow the identity provider to use your data (credentials). The following image is an example:
267270

268271
:::image type="content" source="../../../assets/images/authentication/auth-bot-connection-test-accept.PNG" alt-text="The screenshot shows how to add Teams bot auth connection string adv1.":::
269272

@@ -368,7 +371,7 @@ Alternatively, while in Visual Studio, you can follow these steps:
368371
1. In the dropdown menu, select **Publish**.
369372
1. In the displayed window, select the **New** link.
370373
1. In the dialog window, select **App Service** and **Create New**.
371-
1. Select the **Publish** button.
374+
1. Select **Publish**.
372375
1. In the next dialog window, enter the required information.
373376

374377
:::image type="content" source="../../../assets/images/authentication/auth-bot-app-service.png" alt-text="Screenshot shows how to enter required information for auth app service.":::
@@ -422,7 +425,7 @@ and when for these, and just reference that from here, along with the set of ste
422425
:::image type="content" source="../../../assets/images/authentication/auth-bot-deployed-logout.PNG" alt-text="Screenshot shows how to sign out of the bot.":::
423426

424427
> [!NOTE]
425-
> If you're having problems signing in, try to test the connection again as described in the previous steps. This could recreate the authentication token.
428+
> If you're having problems signing in, try to test the connection again as described in the [previous steps](#test-the-connection). This could recreate the authentication token.
426429
> With the Web Chat client in Azure, you may need to sign in several times before the authentication is established correctly.
427430

428431
> [!div class="nextstepaction"]

0 commit comments

Comments
 (0)