- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi everyone! I'm building a custom application and need to authenticate it with ServiceNow using OAuth 2.0 so it can securely access ServiceNow APIs. It seems that setup steps of OAuth has been changed from UI.
Can someone walk me through the setup steps?
- How do I register my application in ServiceNow as an OAuth client?
- How do I get the client ID and client secret?
- Any code examples or libraries that work well with ServiceNow OAuth?
Thanks for the help!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @harshalthak ,
ServiceNow now uses the Machine Identity Console to manage inbound integrations.
Follow Steps to setup:
Create a New Integration.
Select Authorization Code (or your preferred grant type).
Fill in your application details.
Define the OAuth Scopes to restrict unnecessary API access and keep it secure.
Refer Link:
Thanks
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
It looks like your configuration is mostly correct. A few things I'd check:
- Make sure the Client ID and Client Secret are correct.
- Verify that the OAuth Application Registry record is configured to use the Client Credentials grant.
- Check whether the system property glide.oauth.inbound.client.credential.grant_type.enabled is set to true. If you can't edit it, it could be due to your instance or release.
- Have a look at System Logs as they may show a more detailed error than the access_denied message.
Please Accept this response as Solution if it assisted you with your question & Mark this response as Helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Bhargavi Patel ,
Yes the property "glide.oauth.inbound.client.credential.grant_type.enabled" must be in Global scope. Change you application scope to Global and then create property.
Also make sure you have not selected "Enforce token restriction" checkbox. Select only if you have defined REST API Access policies.
Thanks
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
It looks like your configuration is mostly correct. A few things I'd check:
- Make sure the Client ID and Client Secret are correct.
- Verify that the OAuth Application Registry record is configured to use the Client Credentials grant.
- Check whether the system property glide.oauth.inbound.client.credential.grant_type.enabled is set to true. If you can't edit it, it could be due to your instance or release.
- Have a look at System Logs as they may show a more detailed error than the access_denied message.
Please Accept this response as Solution if it assisted you with your question & Mark this response as Helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thanks, Can you share how to set application to Global, when we create field 'glide.oauth.inbound.client.credential.grant_type.enabled' in sys_properties.list ?
The field is not editable. Currently, application is set to some application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @harshalthak ,
Follow the steps to setup oauth 2.0 :
Also have a visual walkthrough of setting up OAuth authentication :
ServiceNow OAuth 2.0 Endpoint Integration
If my response helped mark as helpful and accept the solution.