OAuth2 Client Credentials (Xanadu)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi all,
I’m working on a ServiceNow Xanadu instance and trying to set up an OAuth application using the Client Credentials grant type so an external application can authenticate to my instance. (System OAuth -> Application Registry -> Create an OAuth API endpoint for external clients)
I’ve created the OAuth API endpoint and the client record (client ID + client secret). However, when my external app tries to request a token, the instance returns:
-> Failed to get OAuth2 access token. Status code: 401 Reason: Unauthorized
I’ve double‑checked the client ID, client secret, and token URL, but the authentication still fails.
Has anyone run into this before? Are there specific settings, roles, or ACLs required for Client Credentials on a Xanadu instance that I might be missing?
Any guidance or troubleshooting steps would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello, do you have the property glide.oauth.inbound.client.credential.grant_type.enabled set to true ?
Have you added an oAuth aapplication user to your registry ? (field might not be visible in the form), check via the list.
Review on this article if you have followed all the steps correctly : Up Your OAuth2.0 Game: Inbound Client Credentials ... - ServiceNow Community
I hope this helps !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Hi @Diogo Ramos ,
Thanks for sharing the documentation
I've added the oAuth application user to my registry double-checked all the fields but still receive the same issue :
-> Failed to get OAuth2 access token. Status code: 401 Reason: Unauthorized
Please, note that I don't have a SNOW license, I'm using a free Xanadu instance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
As you are confirming that you are using correct credential,
still validate
1. Ensure you are using the actual secret value, NOT a secret ID. ( Correct Client id and secret is needed )
2. In your Oauth_entity profile, you have selected Grant Type as Client credential
3. Double validate the required permission/role/scope everything you have in the client ID account as per SN documentation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Hi @Tanushree Maiti ,
I've validated all the fields , everything seems to be OK.
The only potential problematic thing is that i can't see Grant Type field in Oauth_entity profile.
Btw, I'm using a free Xanadu instance , i don't have a SNOW license. Is this feature available for a free use, or should I have a license for it ?
