Editar

SSO Setup

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 az CLI 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 Bot Locations 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 guide first.

  1. 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

Entra auth redirect

  1. 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.

Entra oauth scopes

  1. 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

Entra oauth authorize client app

Troubleshooting

If you encounter SSO errors, see the Troubleshooting guide for common issues and solutions.