IUserTokenProvider.GetUserTokenAsync Method

Definition

Attempts to retrieve the token for a user that's in a login flow, using the bot's AppCredentials.

public System.Threading.Tasks.Task<Microsoft.Bot.Schema.TokenResponse> GetUserTokenAsync (Microsoft.Bot.Builder.ITurnContext turnContext, string connectionName, string magicCode, System.Threading.CancellationToken cancellationToken);
abstract member GetUserTokenAsync : Microsoft.Bot.Builder.ITurnContext * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.TokenResponse>
Public Function GetUserTokenAsync (turnContext As ITurnContext, connectionName As String, magicCode As String, cancellationToken As CancellationToken) As Task(Of TokenResponse)

Parameters

turnContext
ITurnContext

Context for the current turn of conversation with the user.

connectionName
String

Name of the auth connection to use.

magicCode
String

(Optional) Optional user entered code to validate.

cancellationToken
CancellationToken

Cancellation token.

Returns

Token Response.

Applies to