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

Unable to generate OAuth token using Client Credentials with full scopes

NaveenK67767246
Mega Contributor

Hi Team,

I am trying to establish a connection between ServiceNow and Jira using OAuth 2.0 Client Credentials flow.

  • I created an application registry with default settings in ServiceNow.

  • In Postman, when I attempt to generate an access token using the Client Credentials grant type, I do not get a valid token.

  • I also need the token with all scopes so that it can be used to call APIs for integration.

Steps I followed:

  1. Created OAuth API endpoint for external clients (System OAuth → Application Registry).

  2. Configured Client ID and Client Secret.

  3. In Postman, tried grant_type=client_credentials with basic authentication.

  4. Token request fails


    How do I correctly configure the application registry to allow client credentials flow?

     


    Is there a way to assign all scopes to the token?

    Regards,
    Naveen
8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

@NaveenK67767246 

I have seen JIRA Spoke using Authorization Code as grant type

check this

Integration Hub | Set up the Jira spoke for Jira Cloud with OAuth 2.0 authentication 

JIRA and ServiceNow Integration for Attachment with Oauth 2.0 connection details 

In docs also it says Auth Code when you use JIRA Spoke

Set up the Jira spoke for Jira Cloud 

AnkurBawiskar_0-1758550466383.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@NaveenK67767246 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

anurampalli
Tera Contributor

Hi @NaveenK67767246 

 

What error are you getting in postman? Is it possible to copy and paste the error here or give a screenshot? What is the code?

 

Also, what steps did you take in Postman to send the request? Is it a POST call or GET call (Should be POST).

 

What is the release of your instance? It is different in Zurich, how you configure OAuth 2.0 but going by your post, I get that it must be an earlier release.

 

Below is the link to my scoped application on GitHub. README.md should help for simple issues. Otherwise, please feel to post all information so someone or the other can give some ideas.

 

GitHub - anurampalli/Asset-Lifecycle-Dashboard-API: The Asset Lifecycle Dashboard API is a "ServiceN...

 

The document named oAuthEntityCreationAndPostmanUsage.pdf is also worth looking at.

 

Best Regards

Anu

Hi Anu, 

 

Thank you for the inputs. The Github collection you have shared has helped us. 

We are going with 'grant type: password' now.

 

Best Regards,

Majo