Azure AD Token - Client Credential

  • Thread starter Thread starter Paul AZ
  • Start date Start date
P

Paul AZ

Guest
Hi Team,

using Microsoft.IdentityModel.Clients.ActiveDirectory;

I am acquiring Access Token using following code.

AuthenticationContext authContext = new AuthenticationContext("url");
ClientCredential cc = new ClientCredential("clientid", "clientcredential");
AuthenticationResult result = authContext.AcquireTokenAsync("url", cc).Result;

The problem is I am getting the same token with 1 hour expiry every time I am calling.

How can I get new token everytime?

Please advice.

Continue reading...
 
Back
Top