How does servicenow OAuth Entity profile automatically refresh the access token?

Kiran Maruthi
Tera Contributor

I have setup the sharepoint online integration connection with grant type as client credential, when I click on the "Get oAuth token" then the client system has given a access token alone with 1hr of validity. But i'm wondering from then how it is getting automatically refreshed without doing anything. can anyone explain what configuration is done in behind.

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Kiran Maruthi 

it's behind the scene logic.

-> It's automated as you are storing client ID and client secret

-> When the access token expires, ServiceNow automatically uses the client credentials (client ID + secret) to request a fresh access token from the OAuth provider (SharePoint Online) behind the scenes.

good explanation here

Auto Refresh OAuth Access Token 

OAuth Grant Types: Explained 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Kiran Maruthi 

Thank you for marking my response as helpful.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader