OAuthClientOld.GetAadTokensAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieve an Azure Active Directory token for particular AAD resources.
public System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<string,Microsoft.Bot.Schema.TokenResponse>> GetAadTokensAsync (string userId, string connectionName, string[] resourceUrls, System.Threading.CancellationToken cancellationToken = default);
member this.GetAadTokensAsync : string * string * string[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<string, Microsoft.Bot.Schema.TokenResponse>>
Public Function GetAadTokensAsync (userId As String, connectionName As String, resourceUrls As String(), Optional cancellationToken As CancellationToken = Nothing) As Task(Of Dictionary(Of String, TokenResponse))
Parameters
- userId
- String
The user's ID.
- connectionName
- String
Name of the auth connection to use for AAD token exchange.
- resourceUrls
- String[]
The collection of resource URLs for which to get tokens.
- cancellationToken
- CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
A task that represents the work queued to execute.
Remarks
If the task completes successfully, the response includes a collection of TokenResponse objects with the resourceUrl and its corresponding TokenResponse.