AuthenticationContext.AcquireTokenAsync Method (String, ClientAssertionCertificate, UserAssertion)

 

Applies to: Version: 2.19.208020213, Platform: .NET Desktop.

Acquires an access token from the authority on behalf of a user. It requires using a user token previously received.

Namespace:   Microsoft.IdentityModel.Clients.ActiveDirectory
Assembly:  Microsoft.IdentityModel.Clients.ActiveDirectory (in Microsoft.IdentityModel.Clients.ActiveDirectory.dll)

public Task<AuthenticationResult> AcquireTokenAsync(
	string resource,
	ClientAssertionCertificate clientCertificate,
	UserAssertion userAssertion
)

Parameters

resource
Type: System.String

Identifier of the target resource that is the recipient of the requested token.

clientCertificate
Type: Microsoft.IdentityModel.Clients.ActiveDirectory.ClientAssertionCertificate

The client certificate to use for token acquisition.

userAssertion
Type: Microsoft.IdentityModel.Clients.ActiveDirectory.UserAssertion

The user assertion (token) to use for token acquisition.

Return Value

Type: System.Threading.Tasks.Task<AuthenticationResult>

It contains Access Token and the Access Token's expiration time.

Return to top
Show: