Unsupported OAuth grant type 'Client Credentials'.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2017 04:15 AM
HI Techies,
can any one help regarding this " Unsupported OAuth grant type 'Client Credentials'. " or 'Resource Owner Cred"
this one i am geeting while trying to get auth token
Related Links |
Get OAuth Token |
I am not able to get auth toke.. what should be the exact problem ...
Regards,
Abhishek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2017 05:16 AM
Take a look in the UI Action called "Get OAuth Token" as that link is just a UI action.
According to UI action code, it looks to me that 'grant_type' is not set to either 'password' or 'client_credentials' or 'authorization_code'. If it's not one of these then you get that error message.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2018 02:14 PM
I am having a similar issue-but when I changed the code, the UI action isn't working. Any thoughts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2021 11:38 PM
It seems like there's a bug in the UI Action itself.
To get this fixed, I had to edit the UI action "Get OAuth Token".
When you log g_scratchpad.grant_type, its value is actually the Grant Type Label and not the value.
Before:
} else if (grantType === 'authorization_code') {
After:
} else if (grantType === 'authorization_code' || grantType === 'Authorization Code') {
I have yet to reach out to ServiceNow to see what they think about this.
Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2025 06:49 AM
Yes, i also ran into same issue, but the g_scratchpad.grant_type for older REST Message seems to be Display Value of Grant Type like Client Credentials/Authorization Code whereas the newer REST Message has the actual value like client_credentials / authorization_code so that's why in UI Action when the condition is checked it got error.
Solution would be creating a new REST Message and then link the OAuth Profile