Skip to content

Commit 12b2fe4

Browse files
authored
Update identifiers-js.md
1 parent a520250 commit 12b2fe4

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,23 @@ Alternatively, you can find the object ID as the `oid` claim and the tenant ID a
105105
// get the Teams user's ID from Graph APIs if only the email is known
106106
const user = await graphClient.api("/users/[email protected]").get();
107107

108+
// Get the tenant from Graph API
109+
const org = await graphClient.api("/organization").get();
110+
const tenant = org.value[0];
111+
112+
//Communication Services resource id
113+
const resourceId = "";
114+
108115
// create an identifier
109-
const teamsUser = { microsoftTeamsUserId: user.id };
116+
const teamsExtensionUser = { userId: user.id, tenantId: tenantId.id, resourceId: resourceId };
110117

111118
// if you're not operating in the public cloud, you must also pass the right Cloud type.
112-
const gcchTeamsUser = { microsoftTeamsUserId: userId, cloud: "gcch" };
119+
const gcchTeamsExtensionUser = { userId: user.id, tenantId: tenantId.id, resourceId: resourceId, cloud: "gcch" };
113120
```
114121

115122
#### API reference
116123

117-
[MicrosoftTeamsUserIdentifier](/javascript/api/@azure/communication-common/microsoftteamsuseridentifier)
124+
[MicrosoftTeamsUserIdentifier](/javascript/api/@azure/communication-common/teamsextensionuseridentifier)
118125

119126
### Unknown
120127

0 commit comments

Comments
 (0)