Dela via


BotFrameworkAdapter.GetAadTokensAsync Metod

Definition

Överlagringar

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

Hämtar Azure Active Directory-token för vissa resurser på en konfigurerad anslutning med hjälp av robotens AppCredentials.

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

Hämtar Azure Active Directory-token för vissa resurser på en konfigurerad anslutning med hjälp av anpassade AppCredentials.

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

Hämtar Azure Active Directory-token för vissa resurser på en konfigurerad anslutning med hjälp av robotens 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))

Parametrar

context
ITurnContext

Kontext för den aktuella konversationsvändningen med användaren.

connectionName
String

Namnet på Azure Active Directory-anslutningen som konfigurerats med den här roboten.

resourceUrls
String[]

Listan över resurs-URL:er att hämta token för.

userId
String

Det användar-ID som token hämtas för. Om du skickar null tas userId från aktiviteten i ITurnContext.

cancellationToken
CancellationToken

Annulleringstoken för asynkron åtgärd.

Returer

Ordlista för resourceUrl till motsvarande TokenResponse.

Implementeringar

Gäller för

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

Hämtar Azure Active Directory-token för vissa resurser på en konfigurerad anslutning med hjälp av anpassade 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))

Parametrar

context
ITurnContext

Kontext för den aktuella konversationsvändningen med användaren.

oAuthAppCredentials
AppCredentials

AppCredentials för OAuth.

connectionName
String

Namnet på Azure Active Directory-anslutningen som konfigurerats med den här roboten.

resourceUrls
String[]

Listan över resurs-URL:er att hämta token för.

userId
String

Det användar-ID som token hämtas för. Om du skickar null tas userId från aktiviteten i ITurnContext.

cancellationToken
CancellationToken

Annulleringstoken för asynkron åtgärd.

Returer

Ordlista för resourceUrl till motsvarande TokenResponse.

Implementeringar

Gäller för