Configure your app in Microsoft Entra ID - Teams (2024)

Edit

Share via

  • Article

Microsoft Entra ID provides app users access to your bot or message extension app. The app user who has signed in to Teams can be given access to your app.

SSO configuration in Microsoft Entra admin center

The bot and message extension apps use Bot Framework for communicating with app users and implementing authentication.

To configure SSO for your bot or message extension app, you'll need to:

  • Configure bot resource in Microsoft Entra ID
  • Configure app in Microsoft Entra ID

Note

Ensure that you've created an app and a bot resource in Microsoft Entra ID.

  • For more information about creating an app in Microsoft Entra ID, see Register a new app in Microsoft Entra ID.
  • For more information about creating and configuring your bot resource in Microsoft Entra ID, see Create Teams conversation bot.

You can configure your bot resource and app in Microsoft Entra ID for your bot or message extension app in one of the following two ways:

  • Configure SSO using bot resource and configure Microsoft Entra app: You can start by configuring SSO for your bot resource, and enable SSO for your Microsoft Entra app. You'll configure:

    • For bot resource: Messaging endpoint and OAuth connection.

      Note

      When you create your bot resource in Microsoft Entra ID, you can select the option for creating a new app ID, or you can use an existing app ID if you've already registered your app in Microsoft Entra ID.

    • For Microsoft Entra app: App ID URI, scope and permissions, trusted client IDs, access token version, client secret, and redirect URL.

  • Configure SSO using Microsoft Entra app and then configuring bot resource: You can start by configuring your Microsoft Entra app, and then use this app ID in the bot resource when you enable SSO for it. You'll configure:

    • For Microsoft Entra app: App ID URI, access token, trusted client IDs, access token version, client secret, and redirect URL.

    • For bot resource: Messaging endpoint and OAuth connection.

      Note

      Configure bot resource using the app ID generated by Microsoft Entra ID when you registered your app.

Enable SSO in Microsoft Entra ID

By the end of this tutorial, you'll learn to configure:

  • Application ID
  • Bot ID
  • Access token
    • Application ID URI
    • Scope, permissions, and authorized client IDs
    • Client secret
    • Redirect URL
  • Messaging endpoint and OAuth connection

Select one of the following two ways to configure SSO for your bot resource:

  • Use bot resource and configure Microsoft Entra app
  • Use Microsoft Entra app and then configure bot resource

To enable SSO for your app in Microsoft Entra ID:

  • Configure messaging endpoint
  • Configure SSO for Microsoft Entra app:
    • Configure scope for the access token
    • Configure access token version
    • Create client secret
    • Configure redirect URL
  • Configure OAuth connection

Important

Ensure that when you create your bot resource, select the option to create a new app ID. You can also use an existing app ID, if you've already registered an app in Microsoft Entra admin center.

Configure messaging endpoint

Messaging endpoint is where messages are sent to your bot. It enables communication with your bot.

To configure messaging endpoint for your bot resource

  1. Open the Azure portal on your web browser.The Microsoft Azure Bot page opens.

  2. Enter the name of your bot resource in Search box, and select Enter to open it.

  3. Select Settings > Configuration.

    Configure your app in Microsoft Entra ID - Teams (1)

    The Configuration page appears.

  4. Enter the messaging endpoint URL where your bot receives app user's messages.

    Configure your app in Microsoft Entra ID - Teams (2)

  5. Select Apply.

    The messaging endpoint is configured.

You've configured the messaging endpoint for your bot resource. Next, you must enable SSO for the Microsoft Entra app.

Configure SSO for Microsoft Entra app

You must configure permissions and scopes, authorize client applications, update app manifest (previously called Teams app manifest), and create client secret for your Microsoft Entra app. These configurations help to invoke SSO for your bot app.

Configure scope for the access token

Configure scope (permission) options for sending access token to Teams client and authorizing trusted client applications to enable SSO.

You need:

  • To configure application ID URI: Configure scope (permission) options for your app. You'll expose a web API and configure the application ID URI.
  • To configure API scope: Define scope for the API, and the users who can consent for a scope. You can let only admins provide consent for higher-privileged permissions.
  • To configure authorized client application: Create authorized client IDs for applications that you want to pre-authorize. It allows the app user to access the app scopes (permissions) you've configured, without requiring any further consent. Pre-authorize only those client applications you trust, as your app users won't have the opportunity to decline consent.

To configure application ID URI

  1. Open the Azure portal on your web browser.

    The Microsoft Azure Bot page opens.

  2. Enter the name of your bot resource in Search box, and then select Enter to open it.

  3. Select Settings > Configuration.

    Configure your app in Microsoft Entra ID - Teams (3)

    The Configuration page appears.

  4. Select Manage.

    Configure your app in Microsoft Entra ID - Teams (4)

    The Microsoft Entra app page appears.

    The new app ID (client ID) for the app appears on this page. Note and save this app ID. You'll need to update it in the app manifest later. If you used the ID of an existing app when you created the bot resource, then ID of that app appears in this page.

    Configure your app in Microsoft Entra ID - Teams (5)

  5. Select Manage > Expose an API from the left pane.

    The Expose an API page appears.

  6. Select Add to generate application ID URI.

    Configure your app in Microsoft Entra ID - Teams (6)

    The section for setting application ID URI appears.

  7. Enter the application ID URI in the format explained here.

    Configure your app in Microsoft Entra ID - Teams (7)

    • The Application ID URI is prefilled with app ID (GUID) in the format api://{AppID}.

    Important

    • Sensitive information: The application ID URI is logged as part of the authentication process and must not contain sensitive information.

    • Standalone bot: If you're building a standalone bot, enter the application ID URI as api://botid-{YourBotId}. Here, {YourBotId} is your Microsoft Entra application ID.

    • Application ID URI for app with multiple capabilities: If you're building an app with a bot, a messaging extension, and a tab, enter the application ID URI as api://fully-qualified-domain-name.com/botid-{YourClientId}, where {YourClientId} is your bot app ID.

    • Format for domain name: Use lowercase letters for domain name. Don't use upper case.

      For example, to create an app service or web app with resource name, 'demoapplication':

      If base resource name used isURL will be...Format is supported on...
      demoapplicationhttps://demoapplication.example.netAll platforms.
      DemoApplicationhttps://DemoApplication.example.netDesktop, web, and iOS only. It isn't supported in Android.

      Use the lowercase option demoapplication as base resource name.

  8. Select Save.

    A message appears on the browser stating that the application ID URI was updated.

    Configure your app in Microsoft Entra ID - Teams (8)

    The application ID URI displays on the page.

    Configure your app in Microsoft Entra ID - Teams (9)

  9. Note and save the application ID URI. You'll need it for updating the app manifest later.

The application ID URI is configured. You can now define scope and permissions for your app.

To configure API scope

  1. Select + Add a scope in the Scopes defined by this API section.

    Configure your app in Microsoft Entra ID - Teams (10)

    The Add a scope page appears.

  2. Enter the details for configuring scope.

    Configure your app in Microsoft Entra ID - Teams (11)

    1. Enter the scope name.

    2. Select the user who can give consent for this scope. The default option is Admins only.

    3. Enter the Admin consent display name.

    4. Enter the description for admin consent.

    5. Enter the User consent display name.

    6. Enter the user consent description.

    7. Select the Enabled option for state.

    8. Select Add scope.

      Note

      For this tutorial, you can use openid profile User.Read User.ReadBasic.All as scope. This scope is suitable for using the Code sample. You can also add more Graph scopes and permissions. For more information, see Extend your app with Microsoft Graph permissions and scopes.

    A message appears on the browser stating that the scope was added.

    Configure your app in Microsoft Entra ID - Teams (12)

    Note

    The new scope you defined displays on the page. Ensure that you note and save the scope that you've configured. You'll need it to update OAuth connection later.

The scope and permissions are now configured. Next, you must configure the authorized client applications for your Microsoft Entra app.

To configure authorized client application

  1. Move through the Expose an API page to the Authorized client application section, and select + Add a client application.

    Configure your app in Microsoft Entra ID - Teams (13)

    The Add a client application page appears.

  2. Enter the appropriate Microsoft 365 client ID for the applications that you want to authorize for your app’s web application.

    Configure your app in Microsoft Entra ID - Teams (14)

    Note

    • The Microsoft 365 client IDs for mobile, desktop, and web applications for Teams, Microsoft 365 app, and Outlook are the actual IDs that you must add.
    • If your app has a tab app, you'll need either web or SPA, as you can't have a mobile or desktop client application in Teams.
  3. Select one of the following client IDs:

    Use client IDFor authorizing...
    1fec8e78-bce4-4aaf-ab1b-5451cc387264Teams mobile or desktop application
    5e3ce6c0-2b1f-4285-8d4b-75ee78787346Teams web application
    4765445b-32c6-49b0-83e6-1d93765276caMicrosoft 365 web application
    0ec893e0-5785-4de6-99da-4ed124e5296cMicrosoft 365 desktop application
    d3590ed6-52b3-4102-aeff-aad2292ab01cMicrosoft 365 mobile application Outlook desktop application
    bc59ab01-8403-45c6-8796-ac3ef710b3e3Outlook web application
    27922004-5251-4030-b22d-91ecd9a37ea4Outlook mobile application
  4. Select the application ID URI you created for your app in Authorized scopes to add the scope to the web API you exposed.

  5. Select Add application.

    A message appears on the browser stating that the authorized client app was added.

    Configure your app in Microsoft Entra ID - Teams (15)

    The authorized app's client ID displays on the page.

    Configure your app in Microsoft Entra ID - Teams (16)

    Note

    You can authorize more than one client application. Repeat the steps of this procedure for configuring another authorized client application.

You've successfully configured app scope, permissions, and client applications. Ensure that you note and save the application ID URI. Next, you configure the access token version.

Configure access token version

You must define the access token version for your app in the Microsoft Entra app manifest.

To define the access token version

  1. Select Manage > Manifest from the left pane.

    Configure your app in Microsoft Entra ID - Teams (17)

    The Microsoft Entra app manifest appears.

  2. Enter 2 as the value for the accessTokenAcceptedVersion property.

    Configure your app in Microsoft Entra ID - Teams (18)

  3. Select Save.

    A message appears on the browser stating that the app manifest was updated successfully.

    Configure your app in Microsoft Entra ID - Teams (19)

You've updated the access token version. Next, you'll create a client secret for your app.

Create client secret

A client secret is a string that the application uses to prove its identity when requesting a token.

To create a client secret for your app

  1. Select Manage > Certificates & secrets.

    Configure your app in Microsoft Entra ID - Teams (20)

    The Certificates & secrets page appears.

  2. Select + New client secret.

    Configure your app in Microsoft Entra ID - Teams (21)

    The Add a client secret page appears.

    Configure your app in Microsoft Entra ID - Teams (22)

    1. Enter the description.
    2. Select the duration of validity for the secret.
  3. Select Add.

    A message appears on the browser stating that the client secret was updated, and the client secret displays on the page.

    Configure your app in Microsoft Entra ID - Teams (23)

  4. Select the copy button next to the Value of client secret.

  5. Save the value that you copied. You'll need it later for updating code.

    Important

    Ensure that you copy the value of client secret right after you create it. The value is visible only at the time when the client secret is created, and it can't be viewed after that.

You've configured the client secret. Next, you must configure the redirect URL.

Configure redirect URL

Configuration for authentication depends on the platform or device where you want to target your app. You may need to configure redirect URIs, authentication settings, or platform-specific details.

Note

  • If your bot app hasn't been granted IT admin consent, app users have to provide consent the first time they use your app on a different platform.
  • Implicit grant is not required if SSO is enabled on a bot app.

You can configure authentication for multiple platforms as long as the URL is unique.

To configure redirect URL

  1. Open the app you registered in the Azure portal.

  2. Select Manage > Authentication from the left pane.

    Configure your app in Microsoft Entra ID - Teams (24)

    The Platform configurations page appears.

  3. Select + Add a platform.

    Configure your app in Microsoft Entra ID - Teams (25)

    The Configure platforms page appears.

  4. Select the platform that you want to configure for your app. You can select the platform type from Web or SPA.

    Configure your app in Microsoft Entra ID - Teams (26)

    The Configure Web page appears.

    Note

    The configurations will be different based on the platform you select.

  5. Enter the configuration details for the platform.

    Configure your app in Microsoft Entra ID - Teams (27)

    1. Enter the redirect URI. The URI should be unique.

      Note

      The URL mentioned in Redirect URIs is an example.

    2. Enter the front-channel logout URL.

    3. Select the tokens you want Microsoft Entra ID to send for your app.

  6. Select Configure.

    The platform is configured and displayed in the Platform configurations page.

The Microsoft Entra app configuration is complete, and now you must enable SSO support for your bot resource by configuring OAuth connection.

Configure OAuth connection

For a bot to support SSO, you must update its OAuth connection settings. This process associates the bot with app details that you configured for your Microsoft Entra app:

  • Microsoft Entra app ID, which is the client ID
  • Tenant ID
  • Scope and permissions

With the app (client) ID and client secret provided, the Bot Framework Token Store exchanges the token for a graph token with defined permissions.

To update OAuth connection

  1. Open the Azure portal on your web browser.The Microsoft Azure Bot page opens.

  2. Enter the name of your Microsoft Entra app in Search box, and open your app.

  3. Select Settings > Configuration.

    Configure your app in Microsoft Entra ID - Teams (28)

    The Configuration page appears.

  4. Move through the Configuration page and select Add OAuth Connection Settings.

    Configure your app in Microsoft Entra ID - Teams (29)

    The New Connection Setting page appears.

  5. Enter the OAuth configuration settings for the Azure bot.

    Configure your app in Microsoft Entra ID - Teams (30)

    1. Enter a name for the configuration setting.

    2. Select the service provider.

      The remaining configuration details appear.

      Configure your app in Microsoft Entra ID - Teams (31)

    3. Enter the app (client) ID for the Microsoft Entra app.

    4. Enter the client secret that you've created for your bot.

    5. Enter the application ID URI of your bot in the Token Exchange URL.

    6. Enter the tenant ID.

    7. Enter the scope that you defined when you configured the scope and permissions.

  6. Select Save.

  7. Select Apply.

    After you've configured the OAuth connection, you can select Test connection to check if the OAuth connection is successful.

    Configure your app in Microsoft Entra ID - Teams (32)

    If the connection isn't successful, Microsoft Entra ID displays an error. You can verify all the configurations and test again.

Congratulations! You've completed the following app configurations in Microsoft Entra ID required to enable SSO for your bot app:

  • Application ID
  • Bot ID
  • Access token
    • Application ID URI
    • Scope, permissions, and authorized client IDs
    • Client secret
    • Redirect URL
  • Messaging endpoint and OAuth connection

Best practices

  • Keep the Microsoft Entra app registration restricted to its original purpose of service to service application.
  • For better control over disabling authentication connections, rolling secrets, or reusing the Microsoft Entra app with other applications, create an additional Microsoft Entra app for any user to service authentication.

If you use the Microsoft Entra registration app for authentication, you might encounter the following issues:

  • If you renew the certificate attached to the Microsoft Entra app registration, it affects the users who have authenticated with other Microsoft Entra services using the certificate.
  • It creates a single point of failure and control for all authentication-related activities with the bot.

Next step

Add code to enable SSO

Feedback

Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback.

Submit and view feedback for

This product This page

Configure your app in Microsoft Entra ID - Teams (2024)

FAQs

Configure your app in Microsoft Entra ID - Teams? ›

Microsoft Entra ID is a cloud-based identity and access management service that your employees can use to access external resources. Example resources include Microsoft 365, the Azure portal, and thousands of other SaaS applications.

How to configure Microsoft Entra verified ID? ›

To set up Verified ID, follow these steps:
  1. Sign in to the Microsoft Entra admin center as a Global Administrator.
  2. Select Verified ID.
  3. From the left menu, select Setup.
  4. Click the Get started button.

What is the Microsoft teams Entra ID? ›

Microsoft Entra ID is a cloud-based identity and access management service that your employees can use to access external resources. Example resources include Microsoft 365, the Azure portal, and thousands of other SaaS applications.

How to configure an enterprise application? ›

To configure the application properties:
  1. Sign in to the Microsoft Entra admin center as at least a Cloud Application Administrator.
  2. Browse to Identity > Applications > Enterprise applications > All applications.
  3. Search for and select the application that you want to use.
Feb 20, 2024

How to create a Teams app ID? ›

If you wish to manually create the Teams App ID in the Azure portal, you can follow these steps:
  1. Sign in to Azure Portal: Go to Azure Portal and sign in with your account that has the necessary permissions.
  2. Navigate to App Registrations: Once signed in, navigate to the Azure Active Directory section.
Mar 12, 2024

What is Microsoft Entra ID in the Authenticator app? ›

Microsoft Entra ID detects that the user has a strong credential and starts the Strong Credential flow. A notification is sent to the app via Apple Push Notification Service (APNS) on iOS devices, or via Firebase Cloud Messaging (FCM) on Android devices. The user receives the push notification and opens the app.

How to connect to Entra ID? ›

Sign in to your device using your domain credentials. Open the Access work or school app from the Settings menu. Click on Connect and then click on Join this device to Microsoft Entra ID. Enter your Microsoft Entra ID email and click Next.

How to find Microsoft Entra ID? ›

Sign in to the Azure portal. Select Microsoft Entra ID from the menu. The Microsoft Entra ID Overview page appears. To find the Microsoft Entra tenant ID or primary domain name, look for Tenant ID and Primary domain in the Basic information section.

Is Entra replacing Azure? ›

The names Azure Active Directory, Azure AD, and AAD are replaced with Microsoft Entra ID. Microsoft Entra is the name for the product family of identity and network access solutions.

Is Microsoft Entra ID free? ›

Azure AD, now known as Microsoft Entra ID, has a free edition that provides user and group management, on-premises directory synchronization, basic reports, self-service password change for cloud users, and single sign-on across Azure, Microsoft 365, and many popular SaaS apps.

What is the Microsoft Entra application? ›

The Microsoft Entra application gallery is a collection of software as a service (SaaS) applications that are preintegrated with Microsoft Entra ID. The collection contains thousands of applications that make it easy to deploy and configure single sign-on (SSO) and automated user provisioning.

What does configure application mean? ›

Configure” it means to modify those files to reflect the parameters in your particular situation. Usually requiring a restart of those server software to enable those change in parameters.

What is an enterprise application example? ›

To better explain what an enterprise application is, let's look at some examples you may be familiar with: Accounting and Billing Systems. Customer Relationship Management (CRM) Point-of-Sale Software (POS)

What is your Microsoft Teams ID? ›

Select 'About' then 'Version'. A string will appear at the top of your Teams application. This string is your Microsoft Teams ID.

What is Microsoft app ID? ›

A Microsoft application ID is a unique identifier for your bot. This value can not be changed.

Where do I find my app team ID? ›

You'll need to provide your Team ID for certain activities, such as transferring your app to another developer in App Store Connect. In the top navigation of your developer account, click “Membership details” to view your Team ID.

How to create Microsoft Entra ID tenant? ›

To create a new tenant

Navigate to Identity > Overview > Manage tenants. Select Create. On the Basics tab, select the type of tenant you want to create, either Microsoft Entra ID or Microsoft Entra ID (B2C). Select Next: Configuration to move to the Configuration tab.

How do I verify my identity with Microsoft? ›

You can add up to 10 different ways to verify your sign-in, and you can choose from:
  1. An email address or phone number. ...
  2. An authenticator app like Microsoft Authenticator that can provide easier verification, and also allows you to sign in even if the verification device is offline.
  3. A passkey.

How do I verify my Microsoft authenticator ID? ›

The authenticator app asks for a verification code as a test. From the Microsoft Authenticator app, scroll down to your work or school account, copy and paste the 6-digit code from the app into the Step 2: Enter the verification code from the mobile app box on your computer, and then select Verify.

How to get Microsoft Entra ID resource? ›

Generate the Microsoft Entra ID access token for the signed-in Microsoft Entra ID service principal by running the az account get-access-token command. Use the --resource option to specify the unique resource ID for the Azure Databricks service, which is 2ff814a6-3304-4ab8-85cb-cd0e6f879c1d .

Top Articles
Latest Posts
Article information

Author: Moshe Kshlerin

Last Updated:

Views: 5898

Rating: 4.7 / 5 (57 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Moshe Kshlerin

Birthday: 1994-01-25

Address: Suite 609 315 Lupita Unions, Ronnieburgh, MI 62697

Phone: +2424755286529

Job: District Education Designer

Hobby: Yoga, Gunsmithing, Singing, 3D printing, Nordic skating, Soapmaking, Juggling

Introduction: My name is Moshe Kshlerin, I am a gleaming, attractive, outstanding, pleasant, delightful, outstanding, famous person who loves writing and wants to share my knowledge and understanding with you.