You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/concepts/identity-model.md
+69-10Lines changed: 69 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,22 +16,30 @@ ms.subservice: identity
16
16
# Identity model
17
17
18
18
Azure Communication Services is an identity-agnostic service, which offers multiple benefits:
19
-
20
-
- Reuse existing identities from your identity management system and map them with Azure Communication Services identities.
19
+
- Adopt a bring your own identity (BYOI) model, allowing you to reuse existing identities from your identity management system and map them with Azure Communication Services identities.
21
20
- Works well with any existing identity system and has no dependency on a specific identity provider.
22
21
- Keep your user's data, such as their name, private as you don't need to duplicate it in Azure Communication Services.
22
+
- Organizations that use Microsoft Entra ID for identity and access management can now access Azure Communication Services resources directly with Entra ID users. This new support for Entra ID authentication eliminates the need to develop or operate your own identity management or authorization proxy service. This feature is currently in [public preview](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).
23
23
24
24
Azure Communication Services identity model works with two key concepts.
25
25
26
-
## User identity / mapping
26
+
## Bring Your Own Identity (BYOI): Integrating with Your Identity Management System
27
+
Azure Communication Services supports a bring your own identity (BYOI) model, which allows you to integrate with your existing identity management system. You can create user identities in Azure Communication Services and map them to your own user identity system. This approach enables you to manage user identities and access tokens without duplicating user data in Azure Communication Services.
28
+
29
+
The following sections will guide you through the key concepts of the bring your own identity (BYOI) model:
30
+
- How to map user identities: [User identity mapping in the bring your own identity (BYOI) model](#user-identity-mapping-in-the-bring-your-own-identity-byoi-model).
31
+
- How to create and manage access tokens: [Access tokens](#access-tokens).
32
+
- How to implement a client-server architecture for your identity management: [Client-server architecture for the bring your own identity (BYOI) model](#client-server-architecture-for-the-bring-your-own-identity-byoi-model).
33
+
34
+
### User identity mapping in the bring your own identity (BYOI) model
27
35
28
36
When you create a user identity via SDK or REST API, Azure Communication Services creates a unique user identifier. You can't use external identifiers such as phone numbers, user/device/application IDs, or user names directly in Azure Communication Services. Instead, you need to use the Communication Services identities and maintain a mapping to your own user ID system as needed.
29
37
30
38
You can create Azure Communication Service user identities for free. The only charges are incurred when the user consumes communication services such as a chat or a call. How you use your generated Communication Services identity depends on your scenario. For example, you can map an identity 1:1, 1:N, N:1, or N:N, and you can use it for human users or applications. Your end-user can participate in multiple communication sessions, using multiple devices, simultaneously.
31
39
32
-
Managing a mapping between Azure Communication Services user identities and your own identity system is your responsibility as a developer, and doesn't come built-in. For example, you can add a `CommunicationServicesId` column in your existing user table to store the associated Azure Communication Services identity. A mapping design is described in more detail under [Client-server architecture](#client-server-architecture).
40
+
Managing a mapping between Azure Communication Services user identities and your own identity system is your responsibility as a developer, and doesn't come built-in. For example, you can add a `CommunicationServicesId` column in your existing user table to store the associated Azure Communication Services identity. A mapping design is described in more detail under [Client-server architecture for the bring your own identity (BYOI) model](#client-server-architecture-for-the-bring-your-own-identity-byoi-model).
33
41
34
-
## (Preview) Simplify identity mapping with `customId`
42
+
###(Preview) Simplify identity mapping with `customId`
35
43
36
44
> [!IMPORTANT]
37
45
> This feature is available starting with the Identity SDK version `1.4.0-beta1` and REST API version `2025-03-02-preview`.
@@ -45,7 +53,7 @@ When you create a user with a `customId`, Azure Communication Services will retu
45
53
46
54
This feature is supported in both the SDK and REST API, and is especially useful for scenarios where you want to maintain a consistent identity across sessions, devices, or services without additional storage overhead.
47
55
48
-
## Access tokens
56
+
###Access tokens
49
57
50
58
After you create a user identity, the end-user then needs an access token with specific scopes to participate in communications using chat or calls. For example, only a user with a token of `chat` scope can participate in chat. Only a user with a token of `voip` scope can participate in a VoIP call.
51
59
@@ -59,7 +67,7 @@ A user can have multiple tokens simultaneously. Azure Communication Services sup
59
67
60
68
An access token is a JSON Web Token (JWT) and has integrity protection. That is, its claims can't be changed without invalidating the access token because then the token signature no longer matches. If communication primitives are used with invalid tokens, access is denied. Even though tokens aren't encrypted or obfuscated, your application shouldn't depend on the token format or its claims. The token format can change and isn't part of the official API contract. Azure Communication Services supports the following scopes for access tokens.
61
69
62
-
### Chat token scopes
70
+
####Chat token scopes
63
71
64
72
The identity model supports three different chat token scopes. Permissions for each scope are described in the following table.
65
73
-`chat`
@@ -84,7 +92,7 @@ The identity model supports three different chat token scopes. Permissions for e
84
92
| Send typing indicator | Y | Y | Y |
85
93
| Get participant for thread ID | Y | Y | Y |
86
94
87
-
### VoIP token scopes
95
+
####VoIP token scopes
88
96
89
97
The identity model supports two VoIP token scopes. Permissions for each scope are described in the following table.
90
98
-`voip`
@@ -101,13 +109,13 @@ The identity model supports two VoIP token scopes. Permissions for each scope ar
101
109
102
110
You can use the `voip.join` scope together with [Rooms](./rooms/room-concept.md) to create a scheduled call. In this scenario, only invited users get access and users are prohibited from creating any other calls.
103
111
104
-
### Revoke or update access token
112
+
####Revoke or update access token
105
113
- Azure Communication Services Identity library can be used to revoke an access token before its expiration time. Token revocation isn't immediate. It can take up to 15 minutes to propagate.
106
114
- Deleting an identity, resource, or subscription revokes all access tokens.
107
115
- If you want to remove a user's ability to access specific functionality, revoke all access tokens for the user. Then issue a new access token that has a more limited set of scopes.
108
116
- Rotation of access keys revokes all active access tokens that were created by using a former access key. So all identities lose access to Azure Communication Services and need new access tokens.
109
117
110
-
## Client-server architecture
118
+
###Client-server architecture for the bring your own identity (BYOI) model
111
119
112
120
Create and manage user access tokens through a trusted service and not create tokens in your client application. You need the connection string or Microsoft Entra credentials to create user access tokens. Remember to protect the credentials, passing them to a client would risk leaking the secret. Failure to properly manage access tokens can result in extra charges on your resource when tokens are dispensed freely and misused by someone else.
113
121
@@ -127,10 +135,61 @@ Make sure to include only those scopes in the token that your client application
127
135
128
136
Azure App Service or Azure Functions are two alternatives for operating the identity management service. These services scale easily and have built-in features to [authenticate](../../app-service/overview-authentication-authorization.md) users. They're integrated with [OpenID](../../app-service/configure-authentication-provider-openid-connect.md) and third-party identity providers like [Facebook](../../app-service/configure-authentication-provider-facebook.md).
Azure Communication Services now supports Microsoft Entra ID authentication, allowing you to access Azure Communication Services resources directly with Entra ID users. This new support for Entra ID authentication eliminates the need to develop or operate your own identity management or authorization proxy service mentioned in the section [Client-server architecture](#client-server-architecture-for-the-bring-your-own-identity-byoi-model).
143
+
144
+
The following sections will guide you through the essential aspects of Microsoft Entra ID integration:
145
+
146
+
- How to obtain and manage access tokens: [Access tokens with Microsoft Entra ID](#access-tokens-with-microsoft-entra-id).
147
+
- How to implement a client architecture with Microsoft Entra ID: [Client architecture for the Microsoft Entra ID](#client-architecture-for-microsoft-entra-id).
148
+
- Current Limitations and Recommended Guidance: [Limitations](#limitations).
149
+
150
+
### Access tokens with Microsoft Entra ID
151
+
152
+
Only Azure Communication Services access tokens are supported for authentication and authorization in Azure Communication Services, including chat and call functionalities. For more on token structure and management, see [Access tokens](#access-tokens).
153
+
154
+
With Microsoft Entra ID integration, you authenticate users via Entra ID, obtain an Entra ID user access token with API permissions for the Azure Communication Services Clients application, and exchange it for an Azure Communication Services access token. The Azure Communication Services Common SDKs offer seamless authentication by automatically obtaining an Azure Communication Services access token for Entra ID user. For more information on how to implement the logic with Azure Communication Services Common SDK, see [Obtain access tokens for Microsoft Entra ID users](../quickstarts/identity/microsoft-entra-id-authentication-integration.md#developer-actions)
155
+
156
+
The API permissions for the Azure Communication Services Clients application are named consistently with the Azure Communication Services access token scopes described in the sections [Chat token scopes](#chat-token-scopes) and [VoIP token scopes](#voip-token-scopes). The following table shows the mapping between API permissions and the access token scopes:
157
+
158
+
| Azure Communication Services Clients API permission | Azure Communication Services access token scope |
159
+
| --- | --- |
160
+
|`Chat`|`chat`|
161
+
|`Chat.Join`|`chat.join`|
162
+
|`Chat.Join.Limited`|`chat.join.limited`|
163
+
|`VoIP`|`voip`|
164
+
|`VoIP.Join`|`voip.join`|
165
+
166
+
167
+
Azure Communication Services access tokens are issued with the same expiration as the Microsoft Entra ID user access token.
168
+
169
+
### Client architecture for Microsoft Entra ID
170
+
With Microsoft Entra ID integration, you can simplify your architecture by directly using Entra ID for authentication and authorization. The following steps outline the process:
171
+
172
+
:::image type="content" source="./media/entra-client-server-architecture.png" alt-text="Diagram that shows the Microsoft Entra ID integration architecture." border="false":::
173
+
174
+
1. A user starts the client application.
175
+
2. The client application authenticates the user via Microsoft Entra ID. The client application obtains an Entra ID user access token with API permissions for the Azure Communication Services Clients application.
176
+
3. The client application obtains an Azure Communication Services access token for Entra ID user using one of the following methods:
177
+
- Using the Azure Communication Services Common SDKs: The client initializes the [CommunicationTokenCredential](./credentials-best-practices.md#communication-token-credential) with Entra ID token credential options, which automatically handles obtaining an Azure Communication Services access token for Entra ID user in the background. The application then uses this credential to access Azure Communication Services APIs.
178
+
- Custom implementation: The client application calls the [Exchange Entra ID token for Azure Communication Services access token](https://learn.microsoft.com/rest/api/communication/identity/entra-id-token) API to obtain an Azure Communication Services access token. The resulting Azure Communication Services access token is then used to access Azure Communication Services APIs.
179
+
180
+
This architecture eliminates the need for a separate identity management service, as Microsoft Entra ID handles user authentication and authorization directly.
181
+
182
+
### Limitations
183
+
The Microsoft Entra ID integration is currently in preview and has the following limitations:
184
+
-[Continuous Access Evaluation](/entra/identity/conditional-access/concept-continuous-access-evaluation) is not available. To revoke access tokens immediately, follow the instructions in [Revoke access tokens](../quickstarts/identity/access-tokens.md?pivots=platform-azcli#revoke-access-tokens).
185
+
- Removing an Entra ID user does not automatically remove all associated data from the Communication Services resource. To ensure all data is deleted, follow the instructions in [Delete an identity](../quickstarts/identity/access-tokens.md?pivots=platform-azcli#delete-an-identity).
186
+
130
187
## Next steps
131
188
132
189
* To issue tokens, see [Create and manage access tokens for end users](../quickstarts/identity/access-tokens.md).
133
190
* For an introduction to authentication, see [Authenticate to Azure Communication Services](./authentication.md).
191
+
* For details on how authentication works in single-tenant and multitenant Microsoft Entra ID scenarios, refer to [Tenancy in Microsoft Entra ID](https://learn.microsoft.com/entra/identity-platform/single-and-multi-tenant-apps).
192
+
* For a quickstart on how to authenticate Microsoft Entra ID users, see [Authenticate Microsoft Entra ID users](../quickstarts/identity/microsoft-entra-id-authentication-integration.md).
134
193
* To read about data residency and privacy, see [Region availability and data residency](./privacy.md).
135
194
* For a full sample of a simple identity management service, see [Trusted service tutorial](../tutorials/trusted-service-tutorial.md).
136
195
* For a more advanced identity management sample which integrates with Entra ID and Microsoft Graph, see [Authentication service hero sample](../samples/trusted-auth-sample.md).
Copy file name to clipboardExpand all lines: articles/communication-services/concepts/interop/custom-teams-endpoint-authentication-overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ Before we begin:
71
71
- 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).
72
72
73
73
Steps:
74
-
1. Authenticate Alice using the Fabrikam application: Alice is authenticated through Fabrikam's application. A standard OAuth flow with Microsoft Authentication Library (MSAL) is used. Make sure you configure MSAL with a correct [authority](/entra/identity-platform/msal-client-application-configuration#authority). If authentication is successful, the Contoso client application receives a Microsoft Entra access token with a value of `A1` and an Object ID of a Microsoft Entra user with a value of `A2`. Token details are outlined below. Authentication from the developer perspective is explored in this [quickstart](../../quickstarts/manage-teams-identity.md).
74
+
1. Authenticate Alice using the Contoso application: Alice is authenticated through Contoso's application. A standard OAuth flow with Microsoft Authentication Library (MSAL) is used. Make sure you configure MSAL with a correct [authority](/entra/identity-platform/msal-client-application-configuration#authority). If authentication is successful, the Contoso client application receives a Microsoft Entra access token with a value of `A1` and an Object ID of a Microsoft Entra user with a value of `A2`. Token details are outlined below. Authentication from the developer perspective is explored in this [quickstart](../../quickstarts/manage-teams-identity.md).
75
75
1. Get an access token for Alice: The Contoso application by using a custom authentication artifact with value `B` performs authorization logic to decide whether Alice has permission to exchange the Microsoft Entra access token for an Azure Communication Services access token. After successful authorization, the Contoso application performs control plane logic, using artifacts `A1`, `A2`, and `A3`. An Azure Communication Services access token `D` is generated for Alice within the Contoso application. This access token can be used for data plane actions in Azure Communication Services, like Calling. The `A2` and `A3` artifacts are passed along with the artifact `A1`. The validation assures that the Microsoft Entra Token was issued to the expected user. The application prevents attackers from using the Microsoft Entra access tokens issued to other applications or other users. 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).
76
76
1. Call Bob: Alice makes a call to Microsoft 365 user Bob, with Fabrikam's application. The call takes place via the Calling SDK with an Azure Communication Services access token. Learn more about developing apps for Microsoft 365 users [in this quickstart](../../quickstarts/voice-video-calling/get-started-with-voice-video-calling-custom-teams-client.md).
Access tokens enable Azure Communication Services SDKs to [authenticate](../../concepts/authentication.md) directly against Azure Communication Services as a particular identity. You need to create access tokens for end users if you want them to join a call or chat thread within your application.
20
20
21
-
This article describes how to use the Azure Communication Services SDKs to create identities and manage your access tokens. For production use cases, we recommend that you generate access tokens on a server-side service as described in [Client and server architecture](../../concepts/identity-model.md#client-server-architecture).
21
+
This article describes how to use the Azure Communication Services SDKs to create identities and manage your access tokens. For production use cases, we recommend that you generate access tokens on a server-side service as described in [Client and server architecture](../../concepts/identity-model.md#client-server-architecture-for-the-bring-your-own-identity-byoi-model).
0 commit comments