MsalTokenProvider class
Provides tokens using MSAL.
Constructors
| Msal |
Properties
| connection |
Methods
| acquire |
|
| acquire |
|
| get |
Gets an access token. |
| get |
Gets an access token using the auth configuration from the MsalTokenProvider instance and the provided scope. |
| get |
Get an access token for the agentic application |
| get |
Get an access token for the agentic instance |
| get |
Get an access token for the agentic user |
Constructor Details
MsalTokenProvider(AuthConfiguration)
new MsalTokenProvider(connectionSettings?: AuthConfiguration)
Parameters
- connectionSettings
- AuthConfiguration
Property Details
connectionSettings
Method Details
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.
function getAccessToken(authConfig: AuthConfiguration, scope: string): Promise<string>
Parameters
- authConfig
- AuthConfiguration
The authentication configuration.
- scope
-
string
The scope for the token.
Returns
Promise<string>
A promise that resolves to the access token.
getAccessToken(string)
Gets an access token using the auth configuration from the MsalTokenProvider instance and the provided scope.
function getAccessToken(scope: string): Promise<string>
Parameters
- scope
-
string
The scope for the token.
Returns
Promise<string>
A promise that resolves to the access token.
getAgenticApplicationToken(string, string)
Get an access token for the agentic application
function getAgenticApplicationToken(tenantId: string, agentAppInstanceId: string): Promise<string>
Parameters
- tenantId
-
string
- agentAppInstanceId
-
string
Returns
Promise<string>
a promise that resolves to the access token.
getAgenticInstanceToken(string, string)
Get an access token for the agentic instance
function getAgenticInstanceToken(tenantId: string, agentAppInstanceId: string): Promise<string>
Parameters
- tenantId
-
string
- agentAppInstanceId
-
string
Returns
Promise<string>
a promise that resolves to the access token.
getAgenticUserToken(string, string, string, string[])
Get an access token for the agentic user
function getAgenticUserToken(tenantId: string, agentAppInstanceId: string, agenticUserId: string, scopes: string[]): Promise<string>
Parameters
- tenantId
-
string
- agentAppInstanceId
-
string
- agenticUserId
-
string
- scopes
-
string[]
Returns
Promise<string>
a promise that resolves to the access token.