Token refresh automatically when it expires

AkshataP30
Tera Contributor

From MDCA(defender-cloud-apps) they provide service account password client id and client secret and servicenow instance url once they click next and it will start scanning and new refresh scan will be stored in oauth_credential table. So everytime the mdca team has to refresh it manually, is there any process that we can automate or refresh the tokens in servicneow itself without intervention of mdca team. they login to servicebw with all those details and start the scan can we just refresh those token internally in servicneow?

 

 

 

 

1 REPLY 1

Tanushree Maiti
Tera Patron

Hi @AkshataP30 

 

Add the offline_access scope in the Oauth Entity profile.  Screen shot is given below.

 

For this offline_access  scope in an OAuth profile -with a refresh token, the app can interact with the user’s data while the user is offline and gives your app access to resources on behalf of the user for an extended time.

 

Refer: https://www.servicenow.com/community/developer-forum/blog2-tm-quot-oauth-access-token-is-available-b...

 

 

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