ManagedIdentityTokenProvider class

Token provider using Azure Managed Identity.

Constructors

ManagedIdentityTokenProvider(string)

Initializes a new ManagedIdentityTokenProvider.

Methods

getToken(string | string[], GetTokenOptions)

Gets an access token from the configured Azure Identity credential.

Constructor Details

ManagedIdentityTokenProvider(string)

Initializes a new ManagedIdentityTokenProvider.

new ManagedIdentityTokenProvider(clientId?: string)

Parameters

clientId

string

Optional client ID for user-assigned managed identity.

Method Details

getToken(string | string[], GetTokenOptions)

Gets an access token from the configured Azure Identity credential.

function getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken | null>

Parameters

scopes

string | string[]

The authentication scopes.

options
GetTokenOptions

Optional token request settings.

Returns

Promise<AccessToken | null>