User Not Authenticated. Could not retrieve a new access token with the refresh token. invalid_request, Missing parameters: access_token
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2020 11:09 PM
I set up OAuth to Salesforce as Type = OAuth Provider and Grant Type = Authorization Code.
Using Rest Messages works great, when I get an OAuth token manually. However, when I try to create a new record on the client side from a workflow script, I get this error: User Not Authenticated. Could not retrieve a new access token with the refresh token. invalid_request, Missing parameters: access_token.
I've tried several suggestions to get the authorization and refresh tokens from the script but have had no luck so far. Any suggestions would be great.
Thanks,
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2020 11:20 PM
Hi,
I think some parameter is being missed when the script runs
sharing links for help
https://hi.service-now.com/kb_view.do?sysparm_article=KB0754270
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2020 11:33 PM
Hi Ankur, Unfortunately, neither of those helped me. I think I need some help understanding how to write the javascript to access the authorization and refresh tokens. Any other ideas or direction is appreciated.
Thank you,
Connie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2020 11:45 PM
Hi,
sharing links which would help you write ServiceNow script to generate the token
How to Setup OAuth2 authentication for outbound RESTMessageV2 integrations
OAuth : Script to Automate Token Request
How to get Auth Token using script when grant type is Authorization code
How to generate the access token once it is expired from Business Rule?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2023 08:21 AM
Hi Cornelia did you find a fix for this? I'm having same issue