Share via


UserTokenClient.ExchangeTokenAsync Method

Definition

Performs a token exchange operation such as for single sign-on.

public abstract System.Threading.Tasks.Task<Microsoft.Bot.Schema.TokenResponse> ExchangeTokenAsync (string userId, string connectionName, string channelId, Microsoft.Bot.Schema.TokenExchangeRequest exchangeRequest, System.Threading.CancellationToken cancellationToken);
abstract member ExchangeTokenAsync : string * string * string * Microsoft.Bot.Schema.TokenExchangeRequest * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.TokenResponse>
Public MustOverride Function ExchangeTokenAsync (userId As String, connectionName As String, channelId As String, exchangeRequest As TokenExchangeRequest, cancellationToken As CancellationToken) As Task(Of TokenResponse)

Parameters

userId
String

The user id that will be associated with the token.

connectionName
String

Name of the auth connection to use.

channelId
String

The channel Id that will be associated with the token.

exchangeRequest
TokenExchangeRequest

The exchange request details, either a token to exchange or a uri to exchange.

cancellationToken
CancellationToken

Cancellation token.

Returns

A Task representing the result of the asynchronous operation.

Applies to