Unable to generate OAuth token using Client Credentials with full scopes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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:
Created OAuth API endpoint for external clients (System OAuth → Application Registry).
Configured Client ID and Client Secret.
In Postman, tried grant_type=client_credentials with basic authentication.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Ankur Bawiskar,
Apologies for the earlier confusion — let me clarify my question.
I am working on a middleware service (custom code hosted on our own URL) that needs to connect to ServiceNow APIs using OAuth 2.0 Client Credentials flow.
I have already created an Application Registry in ServiceNow (System OAuth → Application Registry → OAuth API endpoint for external clients) with the default settings.
However, when I try to generate an access token in Postman (using grant_type=client_credentials with Basic Auth for Client ID and Secret), the request fails and I do not receive a valid token.
What I need:
- A valid client credentials token that my middleware can use to call ServiceNow APIs.
- The token should have all required scopes/permissions (or at least a way to configure the necessary scopes).
Questions:
- How should I correctly configure the Application Registry to allow client credentials flow?
- Is there a way to assign all scopes/roles to the token, so the middleware can access APIs like incidents, tables, comments, attachments, etc.?
- Is there any limitation in ServiceNow where some APIs cannot be accessed using client credentials flow (and require user-context tokens instead)?
If you could also share any related documentation, that would be really helpful for further development.
Thanks,
Naveen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @Ankur Bawiskar
Much appreciate your reply.
We missed to provide the whole context to you. We are not looking for a direct Jira to ServiceNow connectivity.
Instead we have custom middleware code hosted over https, which is used for synchronization purposes.
We want ability to syns records from Jira to SN via this middleware.
So we would like to connect ServiceNow with our Middleware via OAuth? Preferably Client Credentials grant so that once connected, we wont need any user intervention later.
Would you be able to shed some light in this regard?
Thank you once again for your support.
Best Regards,
Majo Francis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Sorry not very sure on this part.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello
Much appreciate your reply.
We missed to provide the whole context to you. We are not looking for a direct Jira to ServiceNow connectivity.
Instead we have custom middleware code hosted over https, which is used for synchronization purposes.
We want ability to syns records from Jira to SN via this middleware.
So we would like to connect ServiceNow with our Middleware via OAuth? Preferably Client Credentials grant so that once connected, we wont need any user intervention later.
Would you be able to shed some light in this regard?
Thank you once again for your support.
Best Regards,
Naveen