AuthClientAPI interface

Methods

acquireAccessToken(AcquireAccessTokenParams)

Gets an AAD token for the audience provided by the workload.

Method Details

acquireAccessToken(AcquireAccessTokenParams)

Gets an AAD token for the audience provided by the workload.

function acquireAccessToken(params: AcquireAccessTokenParams): Promise<AccessToken>

Parameters

params
AcquireAccessTokenParams

AcquireAccessTokenParams contains:

  1. additionalScopesToConsent.
  2. claimsForConditionalAccessPolicy. This is used when working with OBO flows. To understand how to work with this parameter, please see https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-on-behalf-of-flow#error-response-example

Returns

Promise<AccessToken>

A promise which resolves when the AAD token is fetched.