Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Unsupported OAuth grant type 'Client Credentials'.

Abhishek SNOW
Kilo Contributor

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

I am not able to get auth toke.. what should be the exact problem ...

Regards,

Abhishek

4 REPLIES 4

sergiu_panaite
ServiceNow Employee
ServiceNow Employee

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.


Heather White
Mega Guru

I am having a similar issue-but when I changed the code, the UI action isn't working.  Any thoughts?

adriantan08
Giga Expert

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

naren19
Giga Guru

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