Share via


AuthProvider interface

Represents an authentication provider.

Properties

connectionSettings

The AuthConfiguration used for token acquisition.

getAgenticApplicationToken

Get an access token for the agentic application

getAgenticInstanceToken

Get an access token for the agentic instance

getAgenticUserToken

Get an access token for the agentic user

Methods

acquireTokenOnBehalfOf(AuthConfiguration | string[], string | string[], string)
acquireTokenOnBehalfOf(AuthConfiguration, string[], string)
acquireTokenOnBehalfOf(string[], string)
getAccessToken(AuthConfiguration, string)

Gets an access token for the specified authentication configuration and scope.

getAccessToken(string | AuthConfiguration, string)
getAccessToken(string)

Property Details

connectionSettings

The AuthConfiguration used for token acquisition.

connectionSettings?: AuthConfiguration

Property Value

getAgenticApplicationToken

Get an access token for the agentic application

getAgenticApplicationToken: (tenantId: string, agentAppInstanceId: string) => Promise<string>

Property Value

(tenantId: string, agentAppInstanceId: string) => Promise<string>

getAgenticInstanceToken

Get an access token for the agentic instance

getAgenticInstanceToken: (tenantId: string, agentAppInstanceId: string) => Promise<string>

Property Value

(tenantId: string, agentAppInstanceId: string) => Promise<string>

getAgenticUserToken

Get an access token for the agentic user

getAgenticUserToken: (tenantId: string, agentAppInstanceId: string, upn: string, scopes: string[]) => Promise<string>

Property Value

(tenantId: string, agentAppInstanceId: string, upn: string, scopes: string[]) => Promise<string>

Method Details

acquireTokenOnBehalfOf(AuthConfiguration | string[], string | string[], string)

function acquireTokenOnBehalfOf(authConfigOrScopes: AuthConfiguration | string[], scopesOrOboAssertion?: string | string[], oboAssertion?: string): Promise<string>

Parameters

authConfigOrScopes

AuthConfiguration | string[]

scopesOrOboAssertion

string | string[]

oboAssertion

string

Returns

Promise<string>

acquireTokenOnBehalfOf(AuthConfiguration, string[], string)

function acquireTokenOnBehalfOf(authConfig: AuthConfiguration, scopes: string[], oboAssertion: string): Promise<string>

Parameters

authConfig
AuthConfiguration
scopes

string[]

oboAssertion

string

Returns

Promise<string>

acquireTokenOnBehalfOf(string[], string)

function acquireTokenOnBehalfOf(scopes: string[], oboAssertion: string): Promise<string>

Parameters

scopes

string[]

oboAssertion

string

Returns

Promise<string>

getAccessToken(AuthConfiguration, string)

Gets an access token for the specified authentication configuration and scope.

function getAccessToken(authConfig: AuthConfiguration, scope: string): Promise<string>

Parameters

authConfig
AuthConfiguration

The authentication configuration.

scope

string

The scope for which the access token is requested.

Returns

Promise<string>

A promise that resolves to the access token.

getAccessToken(string | AuthConfiguration, string)

function getAccessToken(authConfigOrScope: string | AuthConfiguration, scope?: string): Promise<string>

Parameters

authConfigOrScope

string | AuthConfiguration

scope

string

Returns

Promise<string>

getAccessToken(string)

function getAccessToken(scope: string): Promise<string>

Parameters

scope

string

Returns

Promise<string>