ITokenAcquirer Interface
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.
Interface for the token acquisition service (for instance encapsulating MSAL.NET).
public interface ITokenAcquirer
type ITokenAcquirer = interface
Public Interface ITokenAcquirer
Methods
GetTokenForAppAsync(String, AcquireTokenOptions, CancellationToken) |
Acquires an authentication result from the authority configured in the app, for the confidential client itself (not on behalf of a user) using the client credentials flow. See https://aka.ms/msal-net-client-credentials. |
GetTokenForUserAsync(IEnumerable<String>, AcquireTokenOptions, ClaimsPrincipal, CancellationToken) |
Typically used from an ASP.NET Core web app or web API controller. This method gets an access token for a downstream API on behalf of the user account for which the claims are provided in the current user. |