AuthenticationContext.AcquireTokenSilent Method (String, String)
Applies to: Version: 2.19.208020213, Platform: .NET Desktop.
Acquires security token without asking for user credential.
Namespace: Microsoft.IdentityModel.Clients.ActiveDirectory
Assembly: Microsoft.IdentityModel.Clients.ActiveDirectory (in Microsoft.IdentityModel.Clients.ActiveDirectory.dll)
Syntax
public AuthenticationResult AcquireTokenSilent(
string resource,
string clientId
)
Parameters
resource
Type: System.StringIdentifier of the target resource that is the recipient of the requested token.
clientId
Type: System.StringIdentifier of the client requesting the token.
Return Value
Type: Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationResult
It contains Access Token, Refresh Token and the Access Token's expiration time. If acquiring token without user credential is not possible, the method throws AdalException.
See Also
AcquireTokenSilent Overload
AuthenticationContext Class
Microsoft.IdentityModel.Clients.ActiveDirectory Namespace
Return to top