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
> 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 =awaitgetBotIdFromGraph()
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)
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.
0 commit comments