Package version:

Class AzurePipelinesCredential

This credential is designed to be used in Azure Pipelines with service connections as a setup for workload identity federation.

Implements

Constructors

Methods

Constructors

  • AzurePipelinesCredential supports Federated Identity on Azure Pipelines through Service Connections.

    Parameters

    • tenantId: string

      tenantId associated with the service connection

    • clientId: string

      clientId associated with the service connection

    • serviceConnectionId: string

      Unique ID for the service connection, as found in the querystring's resourceId key

    • systemAccessToken: string

      The pipeline's System.AccessToken value.

    • options: AzurePipelinesCredentialOptions = {}

      The identity client options to use for authentication.

    Returns AzurePipelinesCredential

Methods

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

    Parameters

    • scopes: string | {}

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

    • Optionaloptions: any

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

    Returns Promise<AccessToken>