MsalAuth Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Authentication class to get access tokens. These tokens in turn are used for signing messages sent to Agents, the Azure Bot Service, Teams, and other services. These tokens are also used to validate incoming data is sent from a trusted source.
This class is used to acquire access tokens using the Microsoft Authentication Library(MSAL).
public class MsalAuth : Microsoft.Agents.Authentication.IAccessTokenProvider, Microsoft.Agents.Authentication.IAgenticTokenProvider, Microsoft.Agents.Authentication.IOBOExchange, Microsoft.Agents.Authentication.Msal.IMSALProvider
type MsalAuth = class
interface IAccessTokenProvider
interface IOBOExchange
interface IMSALProvider
interface IAgenticTokenProvider
Public Class MsalAuth
Implements IAccessTokenProvider, IAgenticTokenProvider, IMSALProvider, IOBOExchange
- Inheritance
-
MsalAuth
- Implements
Constructors
| Name | Description |
|---|---|
| MsalAuth(IServiceProvider, ConnectionSettings) |
Creates a MSAL Authentication Instance. |
| MsalAuth(IServiceProvider, IConfigurationSection) |
Creates a MSAL Authentication Instance. |
Properties
| Name | Description |
|---|---|
| ConnectionSettings | |
Methods
| Name | Description |
|---|---|
| AcquireTokenOnBehalfOf(IEnumerable<String>, String) | |
| CreateClientApplication() | |
| GetAccessTokenAsync(String, IList<String>, Boolean) | |
| GetAgenticApplicationTokenAsync(String, String, CancellationToken) |
Acquires the agentic application (blueprint) token for the specified agent application instance. This is a token-exchange-scoped token bound to the agent instance via federated managed identity, and forms the root of the agentic identity chain. |
| GetAgenticInstanceTokenAsync(String, String, CancellationToken) |
Acquires the agentic instance (autonomous-agent) token for the specified agent application instance using the provider's default scope. |
| GetAgenticInstanceTokenAsync(String, String, IList<String>, CancellationToken) |
Acquires the agentic instance (autonomous-agent) token for the specified agent application instance and the requested scopes. |
| GetAgenticUserTokenAsync(String, String, String, IList<String>, CancellationToken) |
Acquires an agentic user token that represents the agent acting on behalf of a specific agentic user for the requested scopes. |
| GetTokenCredential() | |