你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

AzureCliCredential Class

Definition

Enables authentication to Microsoft Entra ID using Azure CLI to obtain an access token.

public class AzureCliCredential : Azure.Core.TokenCredential
type AzureCliCredential = class
    inherit TokenCredential
Public Class AzureCliCredential
Inherits TokenCredential
Inheritance
AzureCliCredential

Constructors

AzureCliCredential()

Create an instance of AzureCliCredential class.

AzureCliCredential(AzureCliCredentialOptions)

Create an instance of AzureCliCredential class.

Methods

GetToken(TokenRequestContext, CancellationToken)

Obtains a access token from Azure CLI credential, using this access token to authenticate. This method called by Azure SDK clients.

GetTokenAsync(TokenRequestContext, CancellationToken)

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

Applies to