- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2024 01:41 AM - edited 01-03-2024 02:09 AM
If the grant type is client credentials:
How does Servicenow manage to generate a new access token once the first access token that was manually generated got expired ? Does it automatically regenerate subsequent access tokens or is a script required to generate subsequent access tokens ?
If the grant type is auth code/ Resource Owner Credentials:
1. Does servicenow auto generates new access tokens after they get expired based on the valid refresh token ?
2. Do the refresh tokens need to be manually re-generated once it gets expired after a default 864000 seconds or it is auto-generated in Servicenow ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2024 02:07 AM
Hi @Sandhya V , I tried implementing an integration via flow designer and what I observed was if at all a valid refresh token exists (for authorization code grant type), and the REST step contains a valid connection alias defined in the connection details section, everytime the flow gets triggered it will make servicenow look for an access token to successfully make a call, if it finds that the access token has expired it will auto-retrieve access token before making the REST call. But if the refresh token itself is expired then the first manual retrieval will again be needed. If the grant type is client credentials then after first manual retrieval of access token no need to further bother for the regeneration of access token again ever. Hence, for integrations configured via IntegrationHub flow designer there's no separate script required to fetch the tokens as opposed to the integrations configured via REST messages where a separate script shall be required to handle the auto generation of access tokens
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2024 02:56 AM
Hi @Shreyas Khade ,
I am also experiencing the same issue. Did you get any solution to it OOB? or did you customize anything for subsequent access tokens?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2024 02:07 AM
Hi @Sandhya V , I tried implementing an integration via flow designer and what I observed was if at all a valid refresh token exists (for authorization code grant type), and the REST step contains a valid connection alias defined in the connection details section, everytime the flow gets triggered it will make servicenow look for an access token to successfully make a call, if it finds that the access token has expired it will auto-retrieve access token before making the REST call. But if the refresh token itself is expired then the first manual retrieval will again be needed. If the grant type is client credentials then after first manual retrieval of access token no need to further bother for the regeneration of access token again ever. Hence, for integrations configured via IntegrationHub flow designer there's no separate script required to fetch the tokens as opposed to the integrations configured via REST messages where a separate script shall be required to handle the auto generation of access tokens
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2024 11:44 AM
Hi @Maik Skoddow
Can I know, how I can achieve this? As I am also using the OAuth and rest message and integrating with flow designer. But mine doesn't refresh aotomatically.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2024 04:11 AM
Hello @Maik Skoddow ,
Could you please help me how to link REST messages with the respective OAuth profile.