REST API OAuth

burn907
Tera Contributor

I am unable to get a REST API token using ServiceNow OAuth. We are not yet on Zurich to make use of the MIC. I selected OAuth API endpoint for external clients. The token does not get issued when using Client ID and secret. We have Entra ID serving as our OIDC external provider, but only for SSO. There seems to be a redirect here, but this won't support REST API as far as I know. 

 

Any help would be really appreciated.

12 REPLIES 12

yashkamde
Tera Guru

Hello @burn907 ,

Check the connection url in Application Navigator -> Connections,
there check the cloud id in connection url becomes that results in wrong redirecting..

If my response helped mark as helpful and accept the solution..

burn907
Tera Contributor

Thank you. I have a host of connections but I don't have one for the new REST API access. The documentation isn't very clear. Do I need to create a new connection as well as application registry?

Martin Virag
Mega Sage

which system would you like to connect to?  Usually there is a documentation how you can call that system's oauth endpoint. 

Make sure that you select the client-credential flow, that you have the correct scope granted. Click on get oauth token after you have setup the credentials on the credentials table.

You can then check the http outbound requests logs. (you may need to turn change the sys property for the http outbound requests to override the loglevel)

This is an inbound call from an "external" application / agent developed. I have default grant type as Client Credentials. I have an OAuth Entity profile but no OAuth Entity scope