Package version:

Class AzureCliCredential

This credential will use the currently logged-in user login information via the Azure CLI ('az') commandline tool. To do so, it will read the user access token and expire time with Azure CLI command "az account get-access-token".

Implements

Constructors

Methods

Constructors

Methods

  • Authenticates with Microsoft Entra ID and returns an access token if successful. If authentication fails, a CredentialUnavailableError will be thrown with the details of the failure.

    Parameters

    • scopes: string | {}

      The list of scopes for which the token will have access.

    • options: GetTokenOptions = {}

      The options used to configure any requests this TokenCredential implementation might make.

    Returns Promise<AccessToken>