Share via


UserAuthorization.GetTurnTokenAsync Method

Definition

Return a previously acquired token.

public System.Threading.Tasks.Task<string> GetTurnTokenAsync(Microsoft.Agents.Builder.ITurnContext turnContext, string handlerName = default, System.Threading.CancellationToken cancellationToken = default);
member this.GetTurnTokenAsync : Microsoft.Agents.Builder.ITurnContext * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Function GetTurnTokenAsync (turnContext As ITurnContext, Optional handlerName As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)

Parameters

turnContext
ITurnContext
handlerName
String
cancellationToken
CancellationToken

Returns

Remarks

This is a mechanism to access a previously acquired user token during the turn. It should be considered a method to get a token for each handler, not as a way to initiate the signin process. This will also handle refreshing the token if expired between initial acquisition and use.

Applies to