Automating Access Token Retrieval for ServiceNow's Application Registries using Authorization Code

Daemon5
Tera Expert

Hello Community,

I am looking to create a flow or action in ServiceNow to automatically retrieve an access token using the Authorization Code grant type from Application Registries.

Currently, I'm manually clicking the "Get OAuth Token" button on the Credentials screen every hour, as the access token expires quickly.

If anyone has successfully implemented this or has any tips on how to automate this process, I would greatly appreciate your insights.

Thank you in advance!

Daemon5_0-1724315799604.png

Daemon5_1-1724315805489.png

 

 

2 REPLIES 2

Sandhya V
Tera Contributor

@Daemon5 Did you get any solution for this, I also have the same requirement

Hi!

I tried to automatically retrieve a refresh token through a flow or script, but it didn't work with grant type = Authorization Code.
I've decided to switch to using the Client Credential instead... I think this limitation is more on the Azure side rather than ServiceNow.