Skip to content

Commit 14de92c

Browse files
committed
added bot identifier for ios
1 parent dcd125b commit 14de92c

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

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

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ let userId = await getUserIdFromGraph("[email protected]")
4545
let teamsUser = MicrosoftTeamsUserIdentifier(userId: userId)
4646

4747
// if you're not operating in the public cloud, you must also pass the right Cloud type.
48-
gcchTeamsUser = MicrosoftTeamsUserIdentifier(userId: userId, cloud: CommunicationCloudEnvironment.Gcch)
48+
let gcchTeamsUser = MicrosoftTeamsUserIdentifier(userId: userId, cloud: CommunicationCloudEnvironment.Gcch)
4949
```
5050

5151
#### API reference
@@ -67,6 +67,31 @@ let phoneNumber = PhoneNumberIdentifier(phoneNumber: "+112345556789")
6767

6868
[PhoneNumberIdentifier](https://azure.github.io/azure-sdk-for-ios/AzureCommunicationCommon/Classes/PhoneNumberIdentifier.html)
6969

70+
### Microsoft Bot Identifier
71+
72+
> [!NOTE]
73+
> The Microsoft Bot Identifier is currently in public preview. For more information about previews, see [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).
74+
75+
The `MicrosoftBotIdentifier` interface represents a Microsoft bot with its Azure AD bot object ID. In the preview version the interface represents a bot of the Teams Voice applications such as Call Queue and Auto Attendant, and the application should be configured with a resource account. You can retrieve the Azure AD bot object ID via the [Microsoft Graph REST API /users](/graph/api/user-list) endpoint from the `id` property in the response. For more information on how to work with Microsoft Graph, try the [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).
76+
#### Basic usage
77+
78+
```swift
79+
// get the Microsoft bot's ID from Graph APIs, assuming a helper method for the Graph API
80+
let botId = await getBotIdFromGraph()
81+
82+
// create an identifier
83+
let botIdentifier = MicrosoftBotIdentifier(botId: botId)
84+
85+
// if you're not operating in the public cloud, you must also pass the right Cloud type.
86+
// You can also specify tenantized bots by setting the isResourceAccountConfigured flag to true.
87+
// The flag is false if the bot is global and no resource account is configured.
88+
let gcchBotIdentifier = MicrosoftBotIdentifier(botId: botId, isResourceAccountConfigured: true, cloudEnvironment: CommunicationCloudEnvironment.Gcch)
89+
```
90+
91+
#### API reference
92+
93+
[MicrosoftBotIdentifier](https://azure.github.io/azure-sdk-for-ios/AzureCommunicationCommon/Classes/MicrosoftBotIdentifier.html)
94+
7095
### Unknown
7196

7297
The `UnknownIdentifier` exists for future-proofing and you might encounter it when you are on an old version of the SDK and a new identifier type has been introduced recently. Any unknown identifier from the service will be deserialized to the `UnknownIdentifier` in the SDK.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ gcch_bot_identifier = MicrosoftBotIdentifier(
100100

101101
#### API reference
102102

103-
[MicrosoftTeamsUserIdentifier](/python/api/azure-communication-identity/azure.communication.identity.microsoftbotidentifier?view=azure-python-preview)
103+
[MicrosoftBotIdentifier](/python/api/azure-communication-identity/azure.communication.identity.microsoftbotidentifier?view=azure-python-preview)
104104

105105
### Unknown
106106

0 commit comments

Comments
 (0)