ConfidentialClientApplication.IConfidentialClientApplicationWithCertificate.AcquireTokenOnBehalfOfWithCertificateAsync Method

Definition

Overloads

IConfidentialClientApplicationWithCertificate.AcquireTokenOnBehalfOfWithCertificateAsync(IEnumerable<String>, UserAssertion)

[V2 API] Acquires an access token for this application (usually a Web API) from the authority configured in the application, in order to access another downstream protected Web API on behalf of a user using the OAuth 2.0 On-Behalf-Of flow. (See https://aka.ms/msal-net-on-behalf-of). This confidential client application was itself called with a token which will be provided in the userAssertion parameter. This override sends the certificate, which helps certificate rotation in Azure AD

IConfidentialClientApplicationWithCertificate.AcquireTokenOnBehalfOfWithCertificateAsync(IEnumerable<String>, UserAssertion, String)

[V2 API] Acquires an access token for this application (usually a Web API) from a specific authority, in order to access another downstream protected Web API on behalf of a user (See https://aka.ms/msal-net-on-behalf-of). This confidential client application was itself called with a token which will be provided in the This override sends the certificate, which helps certificate rotation in Azure AD userAssertion parameter.

IConfidentialClientApplicationWithCertificate.AcquireTokenOnBehalfOfWithCertificateAsync(IEnumerable<String>, UserAssertion)

Warning

This API is now obsolete.

[V2 API] Acquires an access token for this application (usually a Web API) from the authority configured in the application, in order to access another downstream protected Web API on behalf of a user using the OAuth 2.0 On-Behalf-Of flow. (See https://aka.ms/msal-net-on-behalf-of). This confidential client application was itself called with a token which will be provided in the userAssertion parameter. This override sends the certificate, which helps certificate rotation in Azure AD

[System.Obsolete("Use AcquireTokenOnBehalfOf instead. See https://aka.ms/msal-net-3-breaking-changes", true)]
System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationResult> IConfidentialClientApplicationWithCertificate.AcquireTokenOnBehalfOfWithCertificateAsync (System.Collections.Generic.IEnumerable<string> scopes, Microsoft.Identity.Client.UserAssertion userAssertion);

Parameters

scopes
IEnumerable<String>

Scopes requested to access a protected API

userAssertion
UserAssertion

Instance of UserAssertion containing credential information about the user on behalf of whom to get a token.

Returns

Authentication result containing a token for the requested scopes and account

Implements

Attributes

See also

IConfidentialClientApplicationWithCertificate.AcquireTokenOnBehalfOfWithCertificateAsync(IEnumerable<String>, UserAssertion, String)

Warning

This API is now obsolete.

[V2 API] Acquires an access token for this application (usually a Web API) from a specific authority, in order to access another downstream protected Web API on behalf of a user (See https://aka.ms/msal-net-on-behalf-of). This confidential client application was itself called with a token which will be provided in the This override sends the certificate, which helps certificate rotation in Azure AD userAssertion parameter.

[System.Obsolete("Use AcquireTokenOnBehalfOf instead. See https://aka.ms/msal-net-3-breaking-changes", true)]
System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationResult> IConfidentialClientApplicationWithCertificate.AcquireTokenOnBehalfOfWithCertificateAsync (System.Collections.Generic.IEnumerable<string> scopes, Microsoft.Identity.Client.UserAssertion userAssertion, string authority);

Parameters

scopes
IEnumerable<String>

Scopes requested to access a protected API

userAssertion
UserAssertion

Instance of UserAssertion containing credential information about the user on behalf of whom to get a token.

authority
String

Specific authority for which the token is requested. Passing a different value than configured does not change the configured value

Returns

Authentication result containing a token for the requested scopes and account

Implements

Attributes

See also

Applies to