Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Issue with OAuth Access token generation/retrieval from 3rd party OAuth provider - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Issue with OAuth Access token generation/retrieval from 3rd party OAuth provider
KB0820012

Issue with OAuth Access token generation/retrieval from 3rd party OAuth provider


9480 Views Last updated : Apr 19, 2024 public Copy Permalink English (Original)
  • English (Original)
  • Japanese
KB Summary by Now Assist

Issue

Issue with OAuth Access token generation/retrieval from 3rd party OAuth provider . Common problems include

1) Token is retrieved but when a outbound web service call is made with the token it fails with Authentication error

2) Token retrieval fails with the error

The request body must contain the following parameter: '<parameter_name>'.

Cause

3rd party OAuth provider is expecting additional parameter apart from what is defined in OAuth application registry

Resolution

1) Check with OAuth provider to confirm what is the required parameter for the OAuth flow

2)Extend or copy 'OAuthUtil' script include, and then reference your version from the OAuth API Script field on the Application Registry form for third-party OAuth providers. The custom script include name must start with OAuth.

add the required body parameter in this method:

preprocessAccessToken: function(requestParamMap) {
requestParamMap.put("<parameter_name>", "<value>");
},

For example if the OAuth provider requires "resource" parameter with value "https://outlook.office365.com" the code would look like:

preprocessAccessToken: function(requestParamMap) {

        requestParamMap.put("resource", "https://outlook.office365.com");
    },

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.