Share via


OAuthClientOld.GetUserTokenAsync Method

Definition

Gets a user token for a given user and connection.

public System.Threading.Tasks.Task<Microsoft.Bot.Schema.TokenResponse> GetUserTokenAsync (string userId, string connectionName, string magicCode, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
member this.GetUserTokenAsync : string * string * string * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.TokenResponse>
Public Function GetUserTokenAsync (userId As String, connectionName As String, magicCode As String, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TokenResponse)

Parameters

userId
String

The user's ID.

connectionName
String

Name of the auth connection to use.

magicCode
String

The user entered code to validate.

customHeaders
Dictionary<String,List<String>>

customHeaders.

cancellationToken
CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

A task that represents the work queued to execute.

Remarks

If the task completes successfully, the TokenResponse contains the user token.

Applies to