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
+54-9Lines changed: 54 additions & 9 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
-
## Access tokens
42
+
###Access tokens
35
43
36
44
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.
37
45
@@ -45,7 +53,7 @@ A user can have multiple tokens simultaneously. Azure Communication Services sup
45
53
46
54
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.
47
55
48
-
### Chat token scopes
56
+
####Chat token scopes
49
57
50
58
The identity model supports three different chat token scopes. Permissions for each scope are described in the following table.
51
59
-`chat`
@@ -70,7 +78,7 @@ The identity model supports three different chat token scopes. Permissions for e
70
78
| Send typing indicator | Y | Y | Y |
71
79
| Get participant for thread ID | Y | Y | Y |
72
80
73
-
### VoIP token scopes
81
+
####VoIP token scopes
74
82
75
83
The identity model supports two VoIP token scopes. Permissions for each scope are described in the following table.
76
84
-`voip`
@@ -87,13 +95,13 @@ The identity model supports two VoIP token scopes. Permissions for each scope ar
87
95
88
96
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.
89
97
90
-
### Revoke or update access token
98
+
####Revoke or update access token
91
99
- 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.
92
100
- Deleting an identity, resource, or subscription revokes all access tokens.
93
101
- 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.
94
102
- 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.
95
103
96
-
## Client-server architecture
104
+
###Client-server architecture for the bring your own identity (BYOI) model
97
105
98
106
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.
99
107
@@ -113,6 +121,43 @@ Make sure to include only those scopes in the token that your client application
113
121
114
122
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).
128
+
129
+
The following sections will guide you through the essential aspects of Microsoft Entra ID integration:
130
+
131
+
- How to create and manage access tokens: [Access tokens with Microsoft Entra ID](#access-tokens-with-microsoft-entra-id).
132
+
- How to implement a client-server architecture with Microsoft Entra ID: [Client-server architecture for the Microsoft Entra ID](#client-server-architecture-for-the-microsoft-entra-id).
133
+
- Current Limitations and Recommended Guidance: [Limitations](#limitations).
134
+
135
+
### Access tokens with Microsoft Entra ID
136
+
137
+
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).
138
+
139
+
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 exchanging the Entra ID user access token for an Azure Communication Services access token in the background. To enable this, initialize the [CommunicationTokenCredential](./credentials-best-practices.md#communication-token-credential) class with `EntraCommunicationTokenCredentialOptions` and use the credential for chat and calling features.
140
+
141
+
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:
142
+
143
+
| Azure Communication Services Clients API permission | Azure Communication Services access token scope |
144
+
| --- | --- |
145
+
|`Chat`|`chat`|
146
+
|`Chat.Join`|`chat.join`|
147
+
|`Chat.Join.Limited`|`chat.join.limited`|
148
+
|`VoIP`|`voip`|
149
+
|`VoIP.Join`|`voip.join`|
150
+
151
+
152
+
Azure Communication Services access tokens are issued with the same expiration as the Microsoft Entra ID user access token.
153
+
154
+
### Client-server architecture for the Microsoft Entra ID
155
+
156
+
### Limitations
157
+
The Microsoft Entra ID integration is currently in public preview and has the following limitations:
158
+
-[Continuous Access Evaluation](/entra/identity/conditional-access/concept-continuous-access-evaluation) is not available. To revoke access tokens immediately, follow the instructions in [Create and manage access tokens for end users](../quickstarts/identity/access-tokens.md#create-and-manage-access-tokens-for-end-users).
159
+
- Removing an Entra user does not automatically remove all associated data from the Communication Services resource. To ensure all data is deleted, follow the instructions in [Create and manage access tokens for end users](../quickstarts/identity/access-tokens.md#create-and-manage-access-tokens-for-end-users).
160
+
116
161
## Next steps
117
162
118
163
* To issue tokens, see [Create and manage access tokens for end users](../quickstarts/identity/access-tokens.md).
0 commit comments