Freigeben über


BotFrameworkAdapter.GetAadTokensAsync Methode

Definition

Überlädt

GetAadTokensAsync(ITurnContext, String, String[], String, CancellationToken)

Ruft Azure Active Directory-Token für bestimmte Ressourcen in einer konfigurierten Verbindung mithilfe der AppCredentials des Bots ab.

GetAadTokensAsync(ITurnContext, AppCredentials, String, String[], String, CancellationToken)

Ruft Azure Active Directory-Token für bestimmte Ressourcen in einer konfigurierten Verbindung mit benutzerdefinierten AppCredentials ab.

GetAadTokensAsync(ITurnContext, String, String[], String, CancellationToken)

Ruft Azure Active Directory-Token für bestimmte Ressourcen in einer konfigurierten Verbindung mithilfe der AppCredentials des Bots ab.

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))

Parameter

context
ITurnContext

Kontext für den aktuellen Gesprächswechsel mit dem Benutzer.

connectionName
String

Der Name der mit diesem Bot konfigurierten Azure Active Directory-Verbindung.

resourceUrls
String[]

Die Liste der Ressourcen-URLs, für die Token abgerufen werden sollen.

userId
String

Die Benutzer-ID, für die Token abgerufen werden. Wenn Null übergeben wird, wird die userId aus der Aktivität im ITurnContext übernommen.

cancellationToken
CancellationToken

Das Abbruchtoken des asynchronen Vorgangs.

Gibt zurück

Wörterbuch von resourceUrl zum entsprechenden TokenResponse.

Implementiert

Gilt für:

GetAadTokensAsync(ITurnContext, AppCredentials, String, String[], String, CancellationToken)

Ruft Azure Active Directory-Token für bestimmte Ressourcen in einer konfigurierten Verbindung mit benutzerdefinierten AppCredentials ab.

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))

Parameter

context
ITurnContext

Kontext für den aktuellen Gesprächswechsel mit dem Benutzer.

oAuthAppCredentials
AppCredentials

AppCredentials für OAuth.

connectionName
String

Der Name der mit diesem Bot konfigurierten Azure Active Directory-Verbindung.

resourceUrls
String[]

Die Liste der Ressourcen-URLs, für die Token abgerufen werden sollen.

userId
String

Die Benutzer-ID, für die Token abgerufen werden. Wenn Null übergeben wird, wird die userId aus der Aktivität im ITurnContext übernommen.

cancellationToken
CancellationToken

Das Abbruchtoken des asynchronen Vorgangs.

Gibt zurück

Wörterbuch von resourceUrl zum entsprechenden TokenResponse.

Implementiert

Gilt für: