Прочитать на английском

Поделиться через


AzureCliCredential.GetTokenAsync Method

Definition

Obtains a access token from Azure CLI service, using the access token to authenticate. This method id called by Azure SDK clients.

public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default);

Parameters

requestContext
TokenRequestContext

The details of the authentication request.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

An AccessToken which can be used to authenticate service client calls.

Exceptions

Thrown when the authentication failed.

Applies to