TestAdapter.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.
Overloads
GetAadTokensAsync(ITurnContext, String, String[], String, CancellationToken) |
Returns a dictionary of TokenResponses for the resource URLs, using the bot's AppCredentials. |
GetAadTokensAsync(ITurnContext, AppCredentials, String, String[], String, CancellationToken) |
Returns a dictionary of TokenResponses for the resource URLs, using customized AppCredentials. |
GetAadTokensAsync(ITurnContext, String, String[], String, CancellationToken)
Returns a dictionary of TokenResponses for the resource URLs, using the bot's AppCredentials.
public virtual System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<string,Microsoft.Bot.Schema.TokenResponse>> GetAadTokensAsync (Microsoft.Bot.Builder.ITurnContext context, string connectionName, string[] resourceUrls, string userId = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAadTokensAsync : Microsoft.Bot.Builder.ITurnContext * string * string[] * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<string, Microsoft.Bot.Schema.TokenResponse>>
override this.GetAadTokensAsync : Microsoft.Bot.Builder.ITurnContext * string * string[] * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<string, Microsoft.Bot.Schema.TokenResponse>>
Public Overridable Function GetAadTokensAsync (context As ITurnContext, connectionName As String, resourceUrls As String(), Optional userId As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Dictionary(Of String, TokenResponse))
Parameters
- context
- ITurnContext
The TurnContext.
- connectionName
- String
The connectionName.
- resourceUrls
- String[]
The list of AAD resource URLs.
- userId
- String
The user ID.
- cancellationToken
- CancellationToken
The cancellationToken.
Returns
The dictionary of TokenResponses for each resource URL.
Implements
Applies to
GetAadTokensAsync(ITurnContext, AppCredentials, String, String[], String, CancellationToken)
Returns a dictionary of TokenResponses for the resource URLs, using customized AppCredentials.
public virtual System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<string,Microsoft.Bot.Schema.TokenResponse>> GetAadTokensAsync (Microsoft.Bot.Builder.ITurnContext context, Microsoft.Bot.Connector.Authentication.AppCredentials oAuthAppCredentials, string connectionName, string[] resourceUrls, string userId = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAadTokensAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Connector.Authentication.AppCredentials * string * string[] * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<string, Microsoft.Bot.Schema.TokenResponse>>
override this.GetAadTokensAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Connector.Authentication.AppCredentials * string * string[] * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<string, Microsoft.Bot.Schema.TokenResponse>>
Public Overridable Function GetAadTokensAsync (context As ITurnContext, oAuthAppCredentials As AppCredentials, connectionName As String, resourceUrls As String(), Optional userId As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Dictionary(Of String, TokenResponse))
Parameters
- context
- ITurnContext
The TurnContext.
- oAuthAppCredentials
- AppCredentials
AppCredentials for OAuth.
- connectionName
- String
The connectionName.
- resourceUrls
- String[]
The list of AAD resource URLs.
- userId
- String
The user ID.
- cancellationToken
- CancellationToken
The cancellationToken.
Returns
The dictionary of TokenResponses for each resource URL.