Azure OAuth Refresh Token Not Renewing Automatically

NagaR1940402706
Tera Contributor

Our ServiceNow instance uses Azure OAuth 2.0 for both inbound IMAP and outbound SMTP email processing.

We have observed that access tokens are being renewed automatically, however, the refresh token is not being renewed or rotated after expiry, even though the offline_access scope is added in the OAuth Entity Profile.

Please help identify if any additional Azure or ServiceNow configuration is required to support automatic refresh token renewal.

 

@Tanushree Maiti  @Ankur Bawiskar 

8 REPLIES 8

Tanushree Maiti
Tera Patron

Hi @NagaR1940402706 

 

Its some wired scenario.

 

Do  one thing. From managed token, whatever token you generated for this Oauth profile/connection , delete it.

Validate offline_access scope setting once. Then generate the token. 

Observe if after 1 hour , token is getting expired or not.

Update what you are getting.

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

Since this is a PROD environment, I’m unable to delete it. Also, this configuration was not set up in the lower environments. Is there any alternative approach we can use?

 

Anything we can check it in Azure side? @Tanushree Maiti 

Hi @NagaR1940402706 

 

open the set up documentation and ensure Azure team has provided correct credential with required permission as per the ServiceNow documentation.

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

@Tanushree Maiti  If some configuration is wrong then access token also should not work right? here, access token is working fine.. issue is only with the refresh token