Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AzureCliCredential

Package version

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". This credential will use the currently logged-in user login information via the Azure CLI ('az') commandline tool.

Hierarchy

  • AzureCliCredential

Implements

  • any
  • any

Index

Constructors

Methods

Constructors

constructor

Methods

getToken

  • getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>
  • Authenticates with Azure Active Directory and returns an access token if successful. If authentication fails, a CredentialUnavailableError will be thrown with the details of the failure.

    Parameters

    • scopes: string | string[]

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

    • Optional options: GetTokenOptions

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

    Returns Promise<AccessToken>

Generated using TypeDoc