The CreatorCon Call for Content is officially open! Get started here.

User Not Authenticated. Could not retrieve a new access token with the refresh token. invalid_request, Missing parameters: access_token

Cornelia
Kilo Contributor

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,

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

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

https://community.servicenow.com/community?id=community_question&sys_id=0fd55d39db263b04d82ffb243996...

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Cornelia
Kilo Contributor

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

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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Cornelia did you find a fix for this? I'm having same issue