Ankur Bawiskar
Tera Patron

Hi David,

So it seems you need to enable OAuth and give 3rd party an endpoint for getting access token so here are the steps for setup and test it

1) check OAuth 2.0 plugin is active or not; it should be automatically be active

-> By default, the OAuth plugin is active on new and upgraded instances. If the plugin is not active on your instance, you can activate it. Name of plugin is “OAuth 2.0”. In the left navigation go to the Plugins module under System Definition; Search with name as OAuth 2.0

2) following system property “com.snc.platform.security.oauth.is.active” must be active for the instance for generating access token

3) Navigate to System OAuth > Application Registry and then click New.

On the interceptor page, click Create an OAuth API endpoint for external clients and then fill in the form.

Name - Unique Name that identifies the application

Client ID - auto-generated by the instance

Client Secret - auto-generated by the instance

Create a user in User (sys_user) table which will be used for getting the Access Token in OAuth. There is no need to give any role to this user.

How to test it:

Open Postman application -> it is a open source 3rd party tool for testing APIs

Set the HTTP Method as POST

Endpoint URL -> https://instanceName.service-now.com/oauth_token.do. This is the default endpoint for getting access tokens.

Requests should be formatted as URL-encoded; Requests Parameters should be sent in HTTP POST body

Access requests made within the access token's expiration time always return the current access token.

Different request parameters to be sent in the format of Key Values; After filling all the values hit the SEND button

grant_type - password

client_id - from previous step

client_secret - from previous step

username - username created above

Password - password created for user above

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader