Reputation: 1
I am developing Daemon (App-Only or Unattended) service to communicate with office 365 using EWS, to do this I have acquired a toke using following code.
X509Certificate2 cert = new X509Certificate2(pfxCertificateFilePath, pfxPassword, X509KeyStorageFlags.MachineKeySet);
ClientAssertionCertificate cac = new ClientAssertionCertificate(clientId, cert);
AuthenticationContext authenticationContext = new
AuthenticationContext(authApiUri);
AuthenticationResult authenticationResult = await authenticationContext.AcquireTokenAsync(resourceServerName, cac);
authenticationResult.AccessToken;
I am looking for an option to refresh the access token. I got chance to look at the wiki given by #adal team unfortunately I am confused with the following statement
Note that, AcquireTokenSilent does not need to be called in the Client credentials flow (when the application acquires token without a user, but in its own name)"
Please clarify how to refresh the token obtained by ClientAssertionCertificate
.
Thanks Mahendran
Upvotes: 0
Views: 1337
Reputation: 24549
Please clarify how to refresh the token obtained by ClientAssertionCertificate.
Unfortunately, there is no refresh token returned by using clientAssertionCertificate. We could capture the request with fiddler.
Upvotes: 0