AbstractAcquireTokenParameterBuilder<T>.ExecuteAsync Method

Definition

Overloads

ExecuteAsync()

Executes the Token request asynchronously.

ExecuteAsync(CancellationToken)

Executes the Token request asynchronously, with a possibility of cancelling the asynchronous method.

ExecuteAsync()

Executes the Token request asynchronously.

public System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationResult> ExecuteAsync ();
member this.ExecuteAsync : unit -> System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationResult>
Public Function ExecuteAsync () As Task(Of AuthenticationResult)

Returns

System.Threading.Tasks.Task<AuthenticationResult>

Authentication result containing a token for the requested scopes and parameters set in the builder.

Applies to

ExecuteAsync(CancellationToken)

Executes the Token request asynchronously, with a possibility of cancelling the asynchronous method.

public abstract System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationResult> ExecuteAsync (System.Threading.CancellationToken cancellationToken);
abstract member ExecuteAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationResult>
Public MustOverride Function ExecuteAsync (cancellationToken As CancellationToken) As Task(Of AuthenticationResult)

Parameters

cancellationToken
System.Threading.CancellationToken

Cancellation token. See System.Threading.CancellationToken

Returns

System.Threading.Tasks.Task<AuthenticationResult>

Authentication result containing a token for the requested scopes and parameters set in the builder.

Remarks

Cancellation is not guaranteed, it is best effort. If the operation reaches a point of no return, e.g. tokens are acquired and written to the cache, the task will complete even if cancellation was requested. Do not rely on cancellation tokens for strong consistency.

Applies to