ConfidentialClientApplication.IConfidentialClientApplicationWithCertificate.AcquireTokenForClientWithCertificateAsync Method

Definition

Overloads

IConfidentialClientApplicationWithCertificate.AcquireTokenForClientWithCertificateAsync(IEnumerable<String>)
Obsolete.

[V2 API] Acquires token from the service for the confidential client using the client credentials flow. (See https://aka.ms/msal-net-client-credentials) This method enables application developers to achieve easy certificate roll-over in Azure AD: this method will send the public certificate to Azure AD along with the token request, so that Azure AD can use it to validate the subject name based on a trusted issuer policy. This saves the application admin from the need to explicitly manage the certificate rollover (either via portal or PowerShell/CLI operation)

IConfidentialClientApplicationWithCertificate.AcquireTokenForClientWithCertificateAsync(IEnumerable<String>, Boolean)
Obsolete.

[V2 API] Acquires token from the service for the confidential client using the client credentials flow. (See https://aka.ms/msal-net-client-credentials) This method attempts to look up valid access token in the cache unlessforceRefresh is true This method enables application developers to achieve easy certificate roll-over in Azure AD: this method will send the public certificate to Azure AD along with the token request, so that Azure AD can use it to validate the subject name based on a trusted issuer policy. This saves the application admin from the need to explicitly manage the certificate rollover (either via portal or PowerShell/CLI operation)

IConfidentialClientApplicationWithCertificate.AcquireTokenForClientWithCertificateAsync(IEnumerable<String>)

Caution

Use AcquireTokenForClient instead. See https://aka.ms/msal-net-3-breaking-changes.

[V2 API] Acquires token from the service for the confidential client using the client credentials flow. (See https://aka.ms/msal-net-client-credentials) This method enables application developers to achieve easy certificate roll-over in Azure AD: this method will send the public certificate to Azure AD along with the token request, so that Azure AD can use it to validate the subject name based on a trusted issuer policy. This saves the application admin from the need to explicitly manage the certificate rollover (either via portal or PowerShell/CLI operation)

[System.Obsolete("Use AcquireTokenForClient instead. See https://aka.ms/msal-net-3-breaking-changes. ", true)]
System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationResult> IConfidentialClientApplicationWithCertificate.AcquireTokenForClientWithCertificateAsync (System.Collections.Generic.IEnumerable<string> scopes);
[<System.Obsolete("Use AcquireTokenForClient instead. See https://aka.ms/msal-net-3-breaking-changes. ", true)>]
abstract member Microsoft.Identity.Client.IConfidentialClientApplicationWithCertificate.AcquireTokenForClientWithCertificateAsync : seq<string> -> System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationResult>
override this.Microsoft.Identity.Client.IConfidentialClientApplicationWithCertificate.AcquireTokenForClientWithCertificateAsync : seq<string> -> System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationResult>
Function AcquireTokenForClientWithCertificateAsync (scopes As IEnumerable(Of String)) As Task(Of AuthenticationResult) Implements IConfidentialClientApplicationWithCertificate.AcquireTokenForClientWithCertificateAsync

Parameters

scopes
IEnumerable<String>

Scopes requested to access a protected API

Returns

Authentication result containing application token for the requested scopes

Implements

Attributes

See also

Applies to

IConfidentialClientApplicationWithCertificate.AcquireTokenForClientWithCertificateAsync(IEnumerable<String>, Boolean)

Caution

Use AcquireTokenForClient instead. See https://aka.ms/msal-net-3-breaking-changes.

[V2 API] Acquires token from the service for the confidential client using the client credentials flow. (See https://aka.ms/msal-net-client-credentials) This method attempts to look up valid access token in the cache unlessforceRefresh is true This method enables application developers to achieve easy certificate roll-over in Azure AD: this method will send the public certificate to Azure AD along with the token request, so that Azure AD can use it to validate the subject name based on a trusted issuer policy. This saves the application admin from the need to explicitly manage the certificate rollover (either via portal or PowerShell/CLI operation)

[System.Obsolete("Use AcquireTokenForClient instead. See https://aka.ms/msal-net-3-breaking-changes. ", true)]
System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationResult> IConfidentialClientApplicationWithCertificate.AcquireTokenForClientWithCertificateAsync (System.Collections.Generic.IEnumerable<string> scopes, bool forceRefresh);
[<System.Obsolete("Use AcquireTokenForClient instead. See https://aka.ms/msal-net-3-breaking-changes. ", true)>]
abstract member Microsoft.Identity.Client.IConfidentialClientApplicationWithCertificate.AcquireTokenForClientWithCertificateAsync : seq<string> * bool -> System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationResult>
override this.Microsoft.Identity.Client.IConfidentialClientApplicationWithCertificate.AcquireTokenForClientWithCertificateAsync : seq<string> * bool -> System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationResult>
Function AcquireTokenForClientWithCertificateAsync (scopes As IEnumerable(Of String), forceRefresh As Boolean) As Task(Of AuthenticationResult) Implements IConfidentialClientApplicationWithCertificate.AcquireTokenForClientWithCertificateAsync

Parameters

scopes
IEnumerable<String>

Scopes requested to access a protected API

forceRefresh
Boolean

If TRUE, API will ignore the access token in the cache and attempt to acquire new access token using client credentials

Returns

Authentication result containing application token for the requested scopes

Implements

Attributes

See also

Applies to