Freigeben über


ConfidentialClientApplicationExtensions.StopLongRunningProcessInWebApiAsync Method

Definition

Stops an in-progress long-running on-behalf-of session by removing the tokens associated with the provided cache key. See Long-running OBO in MSAL.NET.

public static System.Threading.Tasks.Task<bool> StopLongRunningProcessInWebApiAsync (this Microsoft.Identity.Client.ILongRunningWebApi clientApp, string longRunningProcessSessionKey, System.Threading.CancellationToken cancellationToken = default);
static member StopLongRunningProcessInWebApiAsync : Microsoft.Identity.Client.ILongRunningWebApi * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
<Extension()>
Public Function StopLongRunningProcessInWebApiAsync (clientApp As ILongRunningWebApi, longRunningProcessSessionKey As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)

Parameters

clientApp
ILongRunningWebApi

Client application to remove tokens from.

longRunningProcessSessionKey
String

OBO cache key used to remove the tokens.

cancellationToken
CancellationToken

Cancellation token.

Returns

True if tokens are removed from the cache; false, otherwise.

Exceptions

longRunningProcessSessionKey is not set.

Applies to