Package version:

Class AuthorizationCodeCredential

Enables authentication to Microsoft Entra ID using an authorization code that was obtained through the authorization code flow, described in more detail in the Microsoft Entra ID documentation:

https://learn.microsoft.com/entra/identity-platform/v2-oauth2-auth-code-flow

Implements

Methods

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>