Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

ServiceNow API using Client credentials

BlinkOps
Tera Contributor

Hey. 

I'm trying to to use the /oauth_token.do endpoint with client credentials:
grant_type=client_credentials
client_id+client+secret , and getting access denied. is it supported to authenticate with just client id+secret? 
if i add the username+password it works. (grant_type=password) 
but following the doc's its suppose to work with client id+secret alone. ->
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1645212
Anyone has any idea?

3 REPLIES 3

Shruti
Mega Sage
Mega Sage

Hi,

It works with client id and client secret. 

Follow this documentation to make it work - https://www.servicenow.com/docs/bundle/xanadu-platform-security/page/integrate/authentication/concep...

BlinkOps
Tera Contributor

Hi, thank you for your reply.

I followed the client credentials guide, created the system property:

BlinkOps_0-1753600729452.png

 

But, when setting the app, I don't have the OAuth Application User field I should see according to the documentation.
Application Registries (what I use):

BlinkOps_1-1753600882916.png

OAuth OICD Entity (I don't use that but I don't have it here as well):

BlinkOps_2-1753600920279.png


Still getting access denied. 

I'm using a dev account, maybe it's related?

Hi

Screenshots are not visible. Can you try to attach again and configure the Application registries form layout to add Oauth application user field 

Shruti_0-1753678049635.png