Language

UserTokenClient.SignOutUserAsync Method

Definition

Signs the user out of a connection, revoking their OAuth token.

public virtual System.Threading.Tasks.Task SignOutUserAsync(string userId, string? connectionName = default, string? channelId = default, Microsoft.Teams.Core.Http.BotRequestContext? requestContext = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SignOutUserAsync : string * string * string * Microsoft.Teams.Core.Http.BotRequestContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.SignOutUserAsync : string * string * string * Microsoft.Teams.Core.Http.BotRequestContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function SignOutUserAsync (userId As String, Optional connectionName As String = Nothing, Optional channelId As String = Nothing, Optional requestContext As BotRequestContext = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

userId
String

The unique identifier of the user to sign out. Cannot be null or empty.

connectionName
String

Optional name of the OAuth connection to sign out from. If null, signs out from all connections.

channelId
String

Optional channel identifier. If provided, limits sign-out to tokens for this channel.

requestContext
BotRequestContext

Optional per-request properties used for authentication.

cancellationToken
CancellationToken

A cancellation token that can be used to cancel the asynchronous operation.

Returns

A task that represents the asynchronous sign-out operation.

Applies to