Not receiving OAuth Refresh Token

Kumar122
Tera Contributor

When we manually renew the "Access Token" I am only getting the "Access Token" renewed. My understanding is that both "Access Token", "Refresh Token" are to be renewed. Because of not having "Refresh Token" we have to manually renew "Access Token" as the expiry time on these "Access Token" are short (1 hr. only).

 

When discussed this with Azure team, they are saying that we don't need to configure anything in ServiceNow "Application Registries" for the field "Refresh Token URL"

 

Appreciate any help with this one. Thank you!

 

Regards
Kumar

8 REPLIES 8

Sujatha V M
Kilo Patron
Kilo Patron

Hi @Kumar122 

Token Expiration and Validity is as follows:

  • Access Token: By default, an instance issues access tokens with a 30-minute lifespan in the scenario where the instance is the OAuth provider.
  • Refresh Token: By default, an instance issues refresh tokens with a 100-day lifespan in the scenario where the instance is the OAuth provider.

Link : https://docs.servicenow.com/bundle/washingtondc-platform-security/page/administer/security/task/t_Ma...

By doing the below steps refresh token gets generated and the expiration date can be extended accordingly.

SujathaVM_0-1711905376305.png

 

Reference : https://www.servicenow.com/community/architect-forum/google-calendar-integration-with-servicenow/td-...

 

Please mark this as helpful and accept it as a solution if this resolves your query.

 

Thanks, 

Sujatha V.M.

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.

Hi @Sujatha V M,

 

As suggested I ran the Script Include (with highlighted modifications) but I don't see "Refresh Token" created. I must be doing something wrong?

 

Appreciate your help!

 

Regards

Kumar

@Kumar122  

Try to re enter the client ID and secret credentials again and test the connection again. 

Please mark this as helpful and accept it as a solution if this resolves your query.

 

Thanks, 

Sujatha V.M.

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.

Hi @Sujatha V M 

 

The Client ID, Secret credential are correct as I am able to get the "Access Token" but not "Refresh Token". Thank you!

 

Regards

Kumar