How to refresh Access Token automatically from Refresh Token.

Pragati Eknath
Tera Contributor

Hello all, We have one requirement to set up ServiceNow App Launcher to be used in conjunction with Okta to enable users to access external apps for the employee center.

Configuration completed to date :
1. Installed Okta spoke plugin
2. Followed ServiceNow setup documentation for Okta Spoke
3. Followed ServiceNow setup documentation for Okta application and configuration
4. Everything is working, but the Access token gets expires after 30 minutes, we have to get the token manually each time. We want to automate this process.     
5. We have tried creating a scheduled job to extend the time and it was working but then apps on the portal were not getting synced.         
6. Also, On the portal when the token is not expired the "Web Application" which is showing the okta apps is taking longer to load around 3 minutes. When the token is expired it loads quickly.

 

Can someone help me to understand the cause and resolution for this?

 

 

 

 

 

 

7 REPLIES 7

Community Alums
Not applicable

Hi Pragati,

 

Have you found a solution to your problem?  I'm experiencing the same thing and find it amazing that this is not automatically done by the OKTA Spoke.

 

Hello Michael,

We have resolved the issue by giving the Super Admin role to the user we are using to create the OAuth token. After that, it is refreshing the access token automatically.

We have given the super admin role only for a specific period of time when we create the client id and client secret and then removed the role and it is working.

Community Alums
Not applicable

Hi Pragati,

 

Thanks for the information.  Did you grant the user the Super Admin role in ServiceNow or OKTA?

 

Thanks,

Mike

 

Pragati Eknath
Tera Contributor

Yes, we have granted the role in okta.