Taal

IUserTokenProvider.GetAadTokensAsync Methode

Definitie

Haalt Azure Active Directory-tokens op voor specifieke bronnen op een geconfigureerde verbinding, met behulp van de AppCredentials van de bot.

public 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>>
Public 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

Context voor de huidige beurt van gesprek met de gebruiker.

connectionName
String

De naam van de Azure Active Directory-verbinding die met deze bot is geconfigureerd.

resourceUrls
String[]

De lijst met resource-URL's voor het ophalen van tokens.

userId
String

De gebruikers-ID voor welke tokens worden opgehaald. Als de user Id in null wordt gehaald, wordt het Activiteit in ITurnContext gehaald.

cancellationToken
CancellationToken

Een annuleringstoken dat kan worden gebruikt door andere objecten of threads om kennisgeving van annulering te ontvangen.

Retouren

Dictionary of resourceUrl naar de bijbehorende TokenResponse.

Van toepassing op