Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AzurePowerShellCredential

Package version

This credential will use the currently logged-in user information from the Azure PowerShell module. To do so, it will read the user access token and expire time with Azure PowerShell command Get-AzAccessToken -ResourceUrl {ResourceScope} This credential will use the currently-logged-in user's login information via the Azure Power Shell command line tool.

Hierarchy

  • AzurePowerShellCredential

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 the authentication cannot be performed through PowerShell, a CredentialUnavailableError will be thrown.

    Parameters

    • scopes: string | string[]

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

    • Default value options: GetTokenOptions = {}

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

    Returns Promise<AccessToken>

Generated using TypeDoc