|
| 1 | +--- |
| 2 | +title: Authentication for apps with Microsoft Entra ID users |
| 3 | +description: Explore single-tenant and multitenant authentication use cases for applications supporting Microsoft Entra ID users. Also learn about authentication artifacts. |
| 4 | +author: aigerimb |
| 5 | +manager: soricos |
| 6 | +services: azure-communication-services |
| 7 | +ms.author: aigerimb |
| 8 | +ms.date: 05/06/2025 |
| 9 | +ms.topic: conceptual |
| 10 | +ms.service: azure-communication-services |
| 11 | +ms.subservice: entra-id-authentication |
| 12 | +ms.reviewer: dominikme, dariac, sanchezjuan |
| 13 | +ms.custom: kr2b-contr-experiment |
| 14 | +--- |
| 15 | + |
| 16 | +# Single-tenant and multitenant authentication for Microsoft Entra ID users |
| 17 | + |
| 18 | + This article provides an overview of the authentication process for both single-tenant and multitenant *Microsoft Entra ID* applications. It explains how authentication can be used when building communication experiences for Microsoft Entra ID users with *Azure Communication Services*, and breaks down the individual authentication artifacts involved in each use case. |
| 19 | + |
| 20 | +## Case 1: Example of a single-tenant application |
| 21 | +The Fabrikam company has built an internal application where all users are from the same Microsoft Entra ID tenant. Access to Azure Communication Services is controlled by *Azure Portal blade* or [Entra Id Assignment](/rest/api/communication/identity/entra-id-assignment) REST APIs. |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | +The following sequence diagram details single-tenant authentication. |
| 27 | + |
| 28 | +:::image type="content" source="./media/identity/entra-id/entra-id-single-tenant-authentication-sequence-diagram.svg" alt-text="A sequence diagram that details authentication of Fabrikam's Microsoft Entra ID users. The client application gets an Azure Communication Services access token for a single tenant Microsoft Entra application." lightbox="./media/identity/entra-id/entra-id-single-tenant-authentication-sequence-diagram.svg"::: |
| 29 | + |
| 30 | +Before we begin: |
| 31 | +- Alice or her Microsoft Entra administrator needs to give the custom Microsoft Entra ID application consent, prior to the first attempt to sign in. Learn more about [consent](../../../active-directory/develop/consent-framework.md). |
| 32 | +- The Fabrikam Azure Communication Services resource admin needs to grant Alice permission to perform her role via *Azure Portal blade* or [Entra Id Assignment](/rest/api/communication/identity/entra-id-assignment) REST APIs. |
| 33 | + |
| 34 | +Steps: |
| 35 | +1. Authenticate Alice using Microsoft Entra ID: Alice is authenticated using a standard OAuth flow with *Microsoft Authentication Library (MSAL)* or *Azure Identity SDK*. If authentication is successful, the client application receives a Microsoft Entra access token, with a value of `A`. Tokens are outlined later in this article. Authentication from the developer perspective is explored in this [quickstart](). |
| 36 | +1. Get an access token for Alice: The Fabrikam application by using the authentication artifact with value `A` performs exchange the Microsoft Entra access token for an Azure Communication Services access token logic. After successful authorization, the Azure Communication Services access token `B` is generated for Alice within the Fabrikam application. This access token can be used for data plane actions in Azure Communication Services, like Calling. For more information on how to get `A` artifacts, see [Receive the Microsoft Entra user token and object ID via the MSAL library](../../quickstarts/manage-teams-identity.md?pivots=programming-language-csharp#step-1-receive-the-azure-ad-user-token-and-object-id-via-the-msal-library) and [Get an Application ID](../troubleshooting-info.md#get-an-application-id). |
| 37 | +1. Call Bob: Alice makes a call to Microsoft Entra ID user Bob, with Fabrikam's app. The call takes place via the Calling SDK with an Azure Communication Services access token. Learn more about [developing application for Microsoft Entra ID users](). |
| 38 | + |
| 39 | +Artifacts: |
| 40 | +- Artifact `A` |
| 41 | + - Type: Microsoft Entra access token |
| 42 | + - Audience: _`Azure Communication Services`_, control plane |
| 43 | + - Source: Fabrikam's Microsoft Entra tenant |
| 44 | + - Permissions: _All permissions listed in [Access tokens with Microsoft Entra ID](./identity-model.md#access-tokens-with-microsoft-entra-id)_ |
| 45 | +- Artifact `B` |
| 46 | + - Type: Azure Communication Services access token |
| 47 | + - Audience: _`Azure Communication Services`_, data plane |
| 48 | + - Azure Communication Services Resource ID: Fabrikam's _`Azure Communication Services Resource ID`_ |
| 49 | + |
| 50 | +## Case 2: Example of a multitenant application |
| 51 | +The Contoso company has built an application for external customers. The Fabrikam company decided to use the application. This application uses Microsoft Entra ID authentication within Contoso's infrastructure. |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | +The following sequence diagram details multitenant authentication. |
| 56 | + |
| 57 | +:::image type="content" source="./media/identity/entra-id/entra-id-multi-tenant-authentication-sequence-diagram.svg" alt-text="A sequence diagram that details authentication of Microsoft Entra ID users and Azure Communication Services access tokens for multitenant Microsoft Entra applications." lightbox="./media/identity/entra-id/entra-id-multi-tenant-authentication-sequence-diagram.svg"::: |
| 58 | + |
| 59 | +Before we begin: |
| 60 | +- Alice or her Microsoft Entra administrator needs to give Contoso's Microsoft Entra application consent before the first attempt to sign in. Learn more about [consent](/entra/identity-platform/application-consent-experience). |
| 61 | +- The Contoso Azure Communication Services resource admin needs to grant Alice permission to perform her role via *Azure Portal blade* or [Entra Id Assignment](/rest/api/communication/identity/entra-id-assignment) REST APIs. |
| 62 | + |
| 63 | +Steps: |
| 64 | +1. Authenticate Alice using the Contoso application: Alice is authenticated using a standard OAuth flow with *Microsoft Authentication Library (MSAL)* or *Azure Identity SDK*. If authentication is successful, the client application receives a Microsoft Entra access token, with a value of `A`. Tokens are outlined later in this article. Authentication from the developer perspective is explored in this [quickstart](). |
| 65 | +1. Get an access token for Alice: The Contoso application by using the authentication artifact with value `A` performs exchange the Microsoft Entra access token for an Azure Communication Services access token logic. After successful authorization, the Azure Communication Services access token `B` is generated for Alice within the Contoso application. This access token can be used for data plane actions in Azure Communication Services, like Calling. For more information on how to get `A` artifacts, see [Receive the Microsoft Entra user token and object ID via the MSAL library](../../quickstarts/manage-teams-identity.md?pivots=programming-language-csharp#step-1-receive-the-azure-ad-user-token-and-object-id-via-the-msal-library) and [Get an Application ID](../troubleshooting-info.md#get-an-application-id). |
| 66 | +1. Call Bob: Alice makes a call to Microsoft Entra ID user Bob, with Contoso's app. The call takes place via the Calling SDK with an Azure Communication Services access token. Learn more about [developing application for Microsoft Entra ID users](). |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | +Artifacts: |
| 71 | +- Artifact `A1` |
| 72 | + - Type: Microsoft Entra access token |
| 73 | + - Audience: _`Azure Communication Services`_, control plane |
| 74 | + - Source: Contoso application registration's Microsoft Entra tenant |
| 75 | + - Permissions: _All permissions listed in [Access tokens with Microsoft Entra ID](./identity-model.md#access-tokens-with-microsoft-entra-id)_ |
| 76 | +- Artifact `B` |
| 77 | + - Type: Azure Communication Services access token |
| 78 | + - Audience: _`Azure Communication Services`_, data plane |
| 79 | + - Azure Communication Services Resource ID: Contoso's _`Azure Communication Services Resource ID`_ |
| 80 | + |
| 81 | +## Next steps |
| 82 | + |
| 83 | +- Try this [quickstart to authenticate Microsoft Entra ID users](). |
| 84 | + |
| 85 | +The following sample app may be interesting to you: |
| 86 | + |
| 87 | +- Try the [Sample App](), which showcases a process of acquiring Azure Communication Services access tokens for Microsoft Entra ID users in mobile and desktop applications. |
| 88 | + |
0 commit comments