AuthenticationContext.AcquireToken Method (String, ClientCredential, 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)
Syntax
public AuthenticationResult AcquireToken(
string resource,
ClientCredential clientCredential,
UserAssertion userAssertion
)
Parameters
resource
Type: System.StringIdentifier of the target resource that is the recipient of the requested token.
clientCredential
Type: Microsoft.IdentityModel.Clients.ActiveDirectory.ClientCredentialThe client credential to use for token acquisition.
userAssertion
Type: Microsoft.IdentityModel.Clients.ActiveDirectory.UserAssertionThe user assertion (token) to use for token acquisition.
Return Value
Type: Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationResult
It contains Access Token and the Access Token's expiration time.
See Also
AcquireToken Overload
AuthenticationContext Class
Microsoft.IdentityModel.Clients.ActiveDirectory Namespace
Return to top