Skip to content

Commit ae2cfea

Browse files
Merge pull request #286177 from DominikMe/domessin/azure-communication/identifier-teamsapp
fix missed code snippet update after rename to MicrosoftTeamsAppIdentifier
2 parents 6b1c349 + 5a46851 commit ae2cfea

File tree

7 files changed

+57
-21
lines changed

7 files changed

+57
-21
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ if (communicationIdentifier instanceof CommunicationUserIdentifier) {
125125
else if (communicationIdentifier instanceof MicrosoftTeamsUserIdentifier) {
126126
Log.i(tag, "Teams user: " + ((MicrosoftTeamsUserIdentifier)communicationIdentifier).getUserId());
127127
}
128+
else if (communicationIdentifier instanceof MicrosoftTeamsAppIdentifier) {
129+
Log.i(tag, "Teams app: " + (( MicrosoftTeamsAppIdentifier)communicationIdentifier).getAppId());
130+
}
128131
else if (communicationIdentifier instanceof PhoneNumberIdentifier) {
129132
Log.i(tag, "Phone number: " + ((PhoneNumberIdentifier)communicationIdentifier).getPhoneNumber());
130133
}
131-
else if (communicationIdentifier instanceof MicrosoftBotIdentifier) {
132-
Log.i(tag, "Microsoft bot: " + ((MicrosoftBotIdentifier)communicationIdentifier).getBotId());
133-
}
134134
else if (communicationIdentifier instanceof UnknownIdentifier) {
135135
Log.i(tag, "Unkown user: " + ((UnknownIdentifier)communicationIdentifier).getId());
136136
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ switch (communicationIdentifier)
113113
print(#"Communication user: \(communicationUser.id)"#)
114114
case let teamsUser as MicrosoftTeamsUserIdentifier:
115115
print(#"Teams user: \(teamsUser.UserId)"#)
116+
case let teamsApp as MicrosoftTeamsAppIdentifier:
117+
print(#"Teams app: \(teamsApp.appId)"#)
116118
case let phoneNumber as PhoneNumberIdentifier:
117119
print(#"Phone number: \(phoneNumber.PhoneNumber)"#)
118-
case let bot as MicrosoftBotIdentifier:
119-
print(#"Microsoft bot: \(bot.botId)"#)
120120
case let unknown as UnknownIdentifier:
121121
print(#"Unknown: \(unknown.Id)"#)
122122
@unknown default:

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ if (communicationIdentifier instanceof CommunicationUserIdentifier) {
125125
else if (communicationIdentifier instanceof MicrosoftTeamsUserIdentifier) {
126126
System.out.println("Teams user: " + ((MicrosoftTeamsUserIdentifier)communicationIdentifier).getUserId());
127127
}
128+
else if (communicationIdentifier instanceof MicrosoftTeamsAppIdentifier) {
129+
Log.i(tag, "Teams app: " + (( MicrosoftTeamsAppIdentifier)communicationIdentifier).getAppId());
130+
}
128131
else if (communicationIdentifier instanceof PhoneNumberIdentifier) {
129132
System.out.println("Phone number: " + ((PhoneNumberIdentifier)communicationIdentifier).getPhoneNumber());
130133
}
131-
else if (communicationIdentifier instanceof MicrosoftBotIdentifier) {
132-
Log.i(tag, "Microsoft bot: " + ((MicrosoftBotIdentifier)communicationIdentifier).getBotId());
133-
}
134134
else if (communicationIdentifier instanceof UnknownIdentifier) {
135135
System.out.println("Unkown user: " + ((UnknownIdentifier)communicationIdentifier).getId());
136136
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ switch (communicationIdentifier.kind)
124124
// narrowed to MicrosoftTeamsUserKind
125125
console.log(`Teams user: ${communicationIdentifier.microsoftTeamsUserId}`);
126126
break;
127+
case "microsoftTeamsApp":
128+
// narrowed to MicrosoftTeamsAppIdentifier
129+
console.log(`Teams app: ${communicationIdentifier.teamsAppId}`);
130+
break;
127131
case "phoneNumber":
128132
// narrowed to PhoneNumberKind
129133
console.log(`Phone number: ${communicationIdentifier.phoneNumber}`);
@@ -132,10 +136,6 @@ switch (communicationIdentifier.kind)
132136
// narrowed to UnknownIdentifierKind
133137
console.log(`Unknown: ${communicationIdentifier.id}`);
134138
break;
135-
case "microsoftBot":
136-
// narrowed to MicrosoftBotIdentifier
137-
console.log(`Microsoft bot: ${communicationIdentifier.botId}`);
138-
break;
139139
default:
140140
// be careful here whether you want to throw because a new SDK version
141141
// can introduce new identifier types

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,12 @@ switch (communicationIdentifier)
127127
case MicrosoftTeamsUserIdentifier teamsUser:
128128
Console.WriteLine($"Teams user: {teamsUser.UserId}");
129129
break;
130+
case MicrosoftTeamsAppIdentifier teamsApp:
131+
Console.WriteLine($"Teams app: {teamsApp.AppId}");
132+
break;
130133
case PhoneNumberIdentifier phoneNumber:
131134
Console.WriteLine($"Phone number: {phoneNumber.PhoneNumber}");
132135
break;
133-
case MicrosoftBotIdentifier bot:
134-
Console.WriteLine($"Microsoft bot: {bot.BotId}");
135-
break;
136136
case UnknownIdentifier unknown:
137137
Console.WriteLine($"Unknown: {unknown.Id}");
138138
break;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ match communication_identifier.kind:
121121
print(f"Communication user: {communication_identifier.properties['id']}")
122122
case CommunicationIdentifierKind.MICROSOFT_TEAMS_USER:
123123
print(f"Teams user: {communication_identifier.properties['user_id']}")
124+
case CommunicationIdentifierKind.MICROSOFT_TEAMS_APP:
125+
print(f"Teams app: {communication_identifier.properties['app_id']}")
124126
case CommunicationIdentifierKind.PHONE_NUMBER:
125127
print(f"Phone number: {communication_identifier.properties['value']}")
126-
case CommunicationIdentifierKind.MICROSOFT_BOT:
127-
print(f"Microsoft bot: {communication_identifier.properties['bot_id']}")
128128
case CommunicationIdentifierKind.UNKNOWN:
129129
print(f"Unknown: {communication_identifier.raw_id}")
130130
case _:

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

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@ switch (communicationIdentifier.kind)
207207
case "microsoftTeamsUser":
208208
console.log(`Teams user: ${communicationIdentifier.microsoftTeamsUser.userId}`);
209209
break;
210+
case "microsoftTeamsApp":
211+
console.log(`Teams user: ${communicationIdentifier.microsoftTeamsApp.appId}`);
212+
break;
210213
case "phoneNumber":
211214
console.log(`Phone number: ${communicationIdentifier.phoneNumber.value}`);
212215
break;
@@ -227,6 +230,8 @@ if (communicationIdentifier.communicationUser) {
227230
console.log(`Communication user: ${communicationIdentifier.communicationUser.id}`);
228231
} else if (communicationIdentifier.microsoftTeamsUser) {
229232
console.log(`Teams user: ${communicationIdentifier.microsoftTeamsUser.userId}`);
233+
} else if (communicationIdentifier.microsoftTeamsApp) {
234+
console.log(`Teams app: ${communicationIdentifier.microsoftTeamsApp.appId}`);
230235
} else if (communicationIdentifier.phoneNumber) {
231236
console.log(`Phone number: ${communicationIdentifier.phoneNumber.value}`);
232237
} else {
@@ -264,28 +269,28 @@ The raw ID is the same as `communicationUser.id`.
264269
```json
265270
{
266271
"microsoftTeamsUser": {
267-
"userId": "[aadUserId]"
272+
"userId": "[entraUserId]"
268273
}
269274
}
270275
```
271276
*Raw ID:*
272277

273-
`8:orgid:[aadUserId]`
278+
`8:orgid:[entraUserId]`
274279

275280
The raw ID is the Microsoft Entra user object ID prefixed with `8:orgid:`.
276281

277282
*Identifier:*
278283
```json
279284
{
280285
"microsoftTeamsUser": {
281-
"userId": "[aadUserId]",
286+
"userId": "[entraUserId]",
282287
"cloud": "gcch"
283288
}
284289
}
285290
```
286291
*Raw ID:*
287292

288-
`8:gcch:[aadUserId]`
293+
`8:gcch:[entraUserId]`
289294

290295
The raw ID is the Microsoft Entra user object ID prefixed with `8:gcch:` or `8:dod:` depending on the cloud environment.
291296

@@ -320,6 +325,37 @@ The raw ID is the Teams visitor ID prefixed with `8:teamsvisitor:`. The Teams vi
320325

321326
The raw ID is the E.164 formatted phone number prefixed with `4:`.
322327

328+
### Microsoft Teams app
329+
330+
*Identifier:*
331+
```json
332+
{
333+
"microsoftTeamsApp": {
334+
"appId": "[entraUserId]"
335+
}
336+
}
337+
```
338+
*Raw ID:*
339+
340+
`28:orgid:[entraUserId]`
341+
342+
The raw ID is the application's Entra user object ID prefixed with `28:orgid:`.
343+
344+
*Identifier:*
345+
```json
346+
{
347+
"microsoftTeamsUser": {
348+
"userId": "[entraUserId]",
349+
"cloud": "gcch"
350+
}
351+
}
352+
```
353+
*Raw ID:*
354+
355+
`28:gcch:[entraUserId]`
356+
357+
The raw ID is the application's Entra user object ID prefixed with `28:gcch:` or `28:dod:` depending on the cloud environment.
358+
323359
### Unknown
324360

325361
*Identifier:*

0 commit comments

Comments
 (0)