ConfidentialClientApplication ConfidentialClientApplication ConfidentialClientApplication Class

Definition

Class to be used for confidential client applications like Web Apps/API.

public sealed class ConfidentialClientApplication : Microsoft.Identity.Client.ClientApplicationBase, Microsoft.Identity.Client.IConfidentialClientApplication
type ConfidentialClientApplication = class
    inherit ClientApplicationBase
    interface IConfidentialClientApplication
    interface IClientApplicationBase
Public NotInheritable Class ConfidentialClientApplication
Inherits ClientApplicationBase
Implements IConfidentialClientApplication
Inheritance
ConfidentialClientApplicationConfidentialClientApplicationConfidentialClientApplication
Implements

Constructors

ConfidentialClientApplication(String, String, ClientCredential, TokenCache, TokenCache) ConfidentialClientApplication(String, String, ClientCredential, TokenCache, TokenCache) ConfidentialClientApplication(String, String, ClientCredential, TokenCache, TokenCache)

Constructor to create instance of the class

ConfidentialClientApplication(String, String, String, ClientCredential, TokenCache, TokenCache) ConfidentialClientApplication(String, String, String, ClientCredential, TokenCache, TokenCache) ConfidentialClientApplication(String, String, String, ClientCredential, TokenCache, TokenCache)

Constructor to create instance of the class

Methods

AcquireTokenByAuthorizationCodeAsync(String, IEnumerable<String>) AcquireTokenByAuthorizationCodeAsync(String, IEnumerable<String>) AcquireTokenByAuthorizationCodeAsync(String, IEnumerable<String>)

Acquires security token from the authority using authorization code previously received. This method does not lookup token cache, but stores the result in it, so it can be looked up using other methods such as AcquireTokenSilentAsync(IEnumerable<String>, IUser).

AcquireTokenForClientAsync(IEnumerable<String>) AcquireTokenForClientAsync(IEnumerable<String>) AcquireTokenForClientAsync(IEnumerable<String>)

Acquires token from the service for the confidential client. This method attempts to look up valid access token in the cache.

AcquireTokenForClientAsync(IEnumerable<String>, Boolean) AcquireTokenForClientAsync(IEnumerable<String>, Boolean) AcquireTokenForClientAsync(IEnumerable<String>, Boolean)

Acquires token from the service for the confidential client. This method attempts to look up valid access token in the cache.

AcquireTokenOnBehalfOfAsync(IEnumerable<String>, UserAssertion) AcquireTokenOnBehalfOfAsync(IEnumerable<String>, UserAssertion) AcquireTokenOnBehalfOfAsync(IEnumerable<String>, UserAssertion)

Acquires token using On-Behalf-Of flow.

AcquireTokenOnBehalfOfAsync(IEnumerable<String>, UserAssertion, String) AcquireTokenOnBehalfOfAsync(IEnumerable<String>, UserAssertion, String) AcquireTokenOnBehalfOfAsync(IEnumerable<String>, UserAssertion, String)

Acquires token using On-Behalf-Of flow.

AcquireTokenSilentAsync(IEnumerable<String>, IUser) AcquireTokenSilentAsync(IEnumerable<String>, IUser) AcquireTokenSilentAsync(IEnumerable<String>, IUser)

Attempts to acquire the access token from cache. Access token is considered a match if it AT LEAST contains all the requested scopes. This means that an access token with more scopes than requested could be returned as well. If access token is expired or close to expiration (within 5 minute window), then refresh token (if available) is used to acquire a new access token by making a network call.

(Inherited from ClientApplicationBase)
AcquireTokenSilentAsync(IEnumerable<String>, IUser, String, Boolean) AcquireTokenSilentAsync(IEnumerable<String>, IUser, String, Boolean) AcquireTokenSilentAsync(IEnumerable<String>, IUser, String, Boolean)

Attempts to acquire the access token from cache. Access token is considered a match if it AT LEAST contains all the requested scopes. This means that an access token with more scopes than requested could be returned as well. If access token is expired or close to expiration (within 5 minute window), then refresh token (if available) is used to acquire a new access token by making a network call.

(Inherited from ClientApplicationBase)
GetAuthorizationRequestUrlAsync(IEnumerable<String>, String, String) GetAuthorizationRequestUrlAsync(IEnumerable<String>, String, String) GetAuthorizationRequestUrlAsync(IEnumerable<String>, String, String)

Gets URL of the authorize endpoint including the query parameters.

GetAuthorizationRequestUrlAsync(IEnumerable<String>, String, String, String, IEnumerable<String>, String) GetAuthorizationRequestUrlAsync(IEnumerable<String>, String, String, String, IEnumerable<String>, String) GetAuthorizationRequestUrlAsync(IEnumerable<String>, String, String, String, IEnumerable<String>, String)

Gets URL of the authorize endpoint including the query parameters.

GetUser(String) GetUser(String) GetUser(String)

Get user by identifier from users available in the cache.

(Inherited from ClientApplicationBase)
Remove(IUser) Remove(IUser) Remove(IUser)

Removes all cached tokens for the specified user.

(Inherited from ClientApplicationBase)

Properties

Authority Authority Authority Inherited from ClientApplicationBase
ClientId ClientId ClientId

Will be a default value. Can be overridden by the developer. Once set, application will bind to the client Id.

(Inherited from ClientApplicationBase)
Component Component Component

Identifier of the component consuming MSAL and it is intended for libraries/SDKs that consume MSAL. This will allow for disambiguation between MSAL usage by the app vs MSAL usage by component libraries.

(Inherited from ClientApplicationBase)
RedirectUri RedirectUri RedirectUri

Redirect Uri configured in the app registration portal. PublicClientApplication has a default value of urn:ietf:wg:oauth:2.0:oob.This default does not apply to iOS and Android as the library needs to leverage system webview for authentication.

(Inherited from ClientApplicationBase)
SliceParameters SliceParameters SliceParameters

Sets or Gets the custom query parameters that may be sent to the STS for dogfood testing. This parameter should not be set by the developers as it may have adverse effect on the application.

(Inherited from ClientApplicationBase)
Users Users Users

Returns a User centric view over the cache that provides a list of all the available users in the cache for the application.

(Inherited from ClientApplicationBase)
ValidateAuthority ValidateAuthority ValidateAuthority

Gets/sets a value indicating whether authority validation is ON or OFF. Value is true by default. It should be set to false by the deveopers for B2C applications.

(Inherited from ClientApplicationBase)

Fields

DefaultAuthority DefaultAuthority DefaultAuthority Inherited from ClientApplicationBase

Extension Methods

IsDefined(Object) IsDefined(Object) IsDefined(Object)

Determines if a certain property is defined or not.

IsNull(Object) IsNull(Object) IsNull(Object)

Determines if a certain property is null or not.

IsPrimitive(Object) IsPrimitive(Object) IsPrimitive(Object)

Determines if a certain property is of premitive JSON type.

Applies to