Application Registries Issue to generate access token
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2025 11:25 PM
Hi,
I have created a application registry 'Create an OAuth API endpoint for external clients'.
Here the webservice user has admin and snc_internal role. For this user
when I am trying to generate the access token for this instance from postman I am receiving 401 error.
I checked with the client_id, client_secret and user password. I am sending correct value only.
But still receiving 401 issue.
Can anyone please help me with this issue? Either I am missing any step or what is the mistake on this?
Stay awesome,
Roshnee Dash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 03:32 AM
But in real-time you won't give admin role to the API user.
Remove that and check this
The ACL on the oauth_credential table might be causing this issue. Try adding a read ACL on the table and provide the role who needs this access to call and you should be able to test it.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 03:38 AM - edited 07-30-2025 03:50 AM
Yes after checking I had removed the admin access @Ankur Bawiskar but from postman getting 401 error.
Stay awesome,
Roshnee Dash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 03:47 AM
I believe I answered your question.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 05:27 AM
Its not yet resolved. One more thing I observed is if I am changing the grant_type to password for the same application registry than its working. But If I am changing to client credential than its not working.
Stay awesome,
Roshnee Dash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 12:17 AM
401 means you are using incorrect credentials of the API user of the target instance?
Also in the target instance the user should have access to the OAuth token table to generate the token.
Once 401 is resolved and you are able to get token all good.
If error is not 401 then some other error might come, it would be mostly that access denied.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader