Skip to content

Commit 8bc65fe

Browse files
authored
Update identifiers-js.md
1 parent d539be9 commit 8bc65fe

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

articles/communication-services/concepts/includes/identifiers/identifiers-js.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,27 @@ const gcchTeamsAppIdentifier = { teamsAppId: id, cloud: "gcch" };
9494

9595
[MicrosoftTeamsAppIdentifier](/javascript/api/@azure/communication-common/microsoftteamsappidentifier)
9696

97+
### Teams Extension user
98+
99+
The `TeamsExtensionUserIdentifier` interface represents a Teams user enabled for Teams Phone Extensibility. A `TeamsExtensionUserIdentifier` requires the Microsoft Entra user object ID of the Teams user, the Microsoft Entra tenant ID where the user resides and the Azure Communication Services resource ID. You can retrieve the Microsoft Entra user object ID via the [Microsoft Graph REST API /users](/graph/api/user-get) endpoint from the `id` property in the response. You can retrieve the Microsoft Entra tenant ID via the [Microsoft Graph REST API /organization](/graph/api/organization-get) endpoint from the `id` property in the response. For more information about working with Microsoft Graph, see [Graph Explorer](https://developer.microsoft.com/en-us/graph/graph-explorer?request=users%2F%7Buser-mail%7D&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com) and look into the [Graph SDK](/graph/sdks/sdks-overview). Alternatively, you can find the object ID as the `oid` and the tenant ID as the `tid` claims in an [Microsoft Entra token](/entra/identity-platform/id-token-claims-reference#payload-claims) or [Microsoft Entra access token](/entra/identity-platform/access-token-claims-reference#payload-claims) after your user signed in and acquired a token.
100+
101+
#### Basic usage
102+
103+
```javascript
104+
// get the Teams user's ID from Graph APIs if only the email is known
105+
const user = await graphClient.api("/users/[email protected]").get();
106+
107+
// create an identifier
108+
const teamsUser = { microsoftTeamsUserId: user.id };
109+
110+
// if you're not operating in the public cloud, you must also pass the right Cloud type.
111+
const gcchTeamsUser = { microsoftTeamsUserId: userId, cloud: "gcch" };
112+
```
113+
114+
#### API reference
115+
116+
[MicrosoftTeamsUserIdentifier](/javascript/api/@azure/communication-common/microsoftteamsuseridentifier)
117+
97118
### Unknown
98119

99120
The `UnknownIdentifier` interface exists for future-proofing and you might encounter it when you are on an old version of the SDK and a new identifier type is recently introduced. Any unknown identifier from the service deserializes to `UnknownIdentifier` in the SDK.

0 commit comments

Comments
 (0)