Partager via


IClientApplicationBase Interface

Definition

Interface defining common API methods and properties. Both PublicClientApplication and ConfidentialClientApplication extend this class. For details see https://aka.ms/msal-net-client-applications

public interface IClientApplicationBase : Microsoft.Identity.Client.IApplicationBase
type IClientApplicationBase = interface
    interface IApplicationBase
Public Interface IClientApplicationBase
Implements IApplicationBase
Derived
Implements

Properties

AppConfig

Details on the configuration of the ClientApplication for debugging purposes.

Authority

Gets the URL of the authority, or the security token service (STS) from which MSAL.NET will acquire security tokens. The return value of this property is either the value provided by the developer in the constructor of the application, or otherwise the value of the Microsoft.Identity.Client.ApplicationBase.DefaultAuthority static member (that is https://login.microsoftonline.com/common/)

UserTokenCache

User token cache which holds ID tokens, access tokens, and refresh tokens for accounts. It's used and updated silently if needed when calling AcquireTokenSilent(IEnumerable<String>, IAccount) It is updated by each acquire token method, with the exception of AcquireTokenForClient(IEnumerable<String>) which only uses the application cache (see AppTokenCache).

Methods

AcquireTokenSilent(IEnumerable<String>, IAccount)

Attempts to acquire an access token for the account from the user token cache, with advanced parameters controlling the network call. See Acquire tokens silently.

AcquireTokenSilent(IEnumerable<String>, String)

Attempts to acquire an access token for the loginHint from the user token cache, with advanced parameters controlling the network call. See Acquire tokens silently.

GetAccountAsync(String)

Get the IAccount by its identifier among the accounts available in the token cache and of the same environment (authority host) as Authority.

GetAccountsAsync()

Returns all the available accounts in the user token cache for the application.

GetAccountsAsync(String)

Only for Azure AD B2C scenarios, get the IAccount collection by its identifier among the accounts available in the token cache based on the user flow.

RemoveAsync(IAccount)

Removes all tokens in the cache for the specified account.

Applies to