BaseAbstractAcquireTokenParameterBuilder<T>.ExecuteAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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
- CancellationToken
Cancellation token. See CancellationToken
Returns
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.
To learn more about potential exceptions thrown by the function, refer to Exceptions in MSAL.NET.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應