Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This section describes how to configure the Azure Bot Service (ABS), the Entra App Registration and the Teams manifest to enable Single-Sign-On (SSO) for your Teams app.
Tip
Let an AI assistant run this for you
The teams-dev skill can orchestrate the full SSO setup for you install it in your AI coding assistant and say "set up SSO for my Teams bot".
Prerequisites
Before starting SSO configuration, ensure you have:
- An Azure-managed Azure Bot Service resource and its associated Entra App Registration (Application ID / Client ID and Tenant ID).
- To set up using CLIs: the
azCLI and the Teams Developer CLI installed and authenticated.
Note
CLI users: migrate first if your bot is Teams-managed
SSO requires an Azure-managed bot because the OAuth connection lives in Azure Bot Service. If you registered with teams app create (default Teams-managed), migrate your bot first:
teams app bot migrate <appId> --subscription <id> --resource-group <rg>
Your CLIENT_ID, CLIENT_SECRET, and TENANT_ID stay the same. See Teams Developer CLI for details.
Configure the Entra App Registration for SSO
You need an Entra ID App Registration to configure the OAuth connection in Azure Bot Service. If you don't already have one, follow the Create the Entra App Registration.
- Add the Bot Framework redirect URI. From your App Registration, navigate to Authentication and add a Web platform redirect URI with the value
https://token.botframework.com/.auth/web/redirect
2. Configure the API. From Expose an API, click Add to Application ID URI and set the value to api://<Your-Application-Id>. Add the scope access_as_user and select who can consent.
3. Authorize the client applications for SSO. To enable the Teams clients, desktop and web, to perform the SSO flow you must add the following client applications to the scope defined before: Teams Desktop 1fec8e78-bce4-4aaf-ab1b-5451cc387264 and Teams Web 5e3ce6c0-2b1f-4285-8d4b-75ee78787346
Create the OAuth connection in Azure Bot Service
You need to add a new OAuth connection to your Azure Bot Service resource.
- From the Bot service resource in the Azure Portal, navigate to
Settings/ConfigurationandAdd OAuth Connection settings. - Provide a name for your connection e.g.
graph, and select the Service ProviderAzure Active Directory v2 - Populate the
TenantId/ClientId/ClientSecretfrom the values obtained in the previous section. Configure the Token Exchange URL with the Application ID URI (e.g.api://<Your-Application-Id>), and add the Scopes you need e.g.User.Read
Configure the App Manifest
The Teams application manifest needs to be updated to include webApplicationInfo with the Application Id and Application ID URI.
Add *.botframework.com to validDomains and add the webApplicationInfo section to your manifest.json:
"validDomains": [
...
// highlight-next-line
"*.botframework.com"
],
// highlight-start
"webApplicationInfo": {
"id": "<Your-Application-Id>",
"resource": "api://<Your-Application-Id>"
}
// highlight-end
Troubleshooting
If you encounter SSO errors, see the Troubleshooting guide for common issues and solutions.