How to set up an external OAuth 2.0 provider in ServiceNow
- Daniel Macias
- Mar 3, 2021
- 2 min read
When making an HTTP Request, some APIs require you first to use OAuth to retrieve an access token (JWT, Client Credentials, etc... ) to authenticate your request. Luckily ServiceNow provides an easy way to set up OAuth 2.0 with external APIs. This article will give you a step-by-step overview as to how to set that up.
Let's get started!
Navigate to System OAuth - Application Registry.

Click "New" at the top of the page to create a new Application Registry.

ServiceNow will then prompt you with the OAuth application type. Select "Connect to a third-party OAuth provider".

A form will appear, and you will have to fill in the following fields:
Name - An identifier for your application registry (can be whatever you want).
Client ID - A credential you must pass along with your OAuth request to successfully retrieve your access token.
Client Secret - Client ID - A credentials you must pass along with your OAuth request to successfully retrieve your access token.
Default Grant type - This dropdown will specify the type of access token that your request will retrieve.
Token URL - The URL that the Application Registry will be making its request to.
The data in each field - other than "Name" - should have been given to you by your OAuth Provider.

Finally, click "Submit"
After loading, ServiceNow will have created a new Application Registry using your OAuth provider. At the bottom of the form in the OAuth Entity Profiles table, a new entry will have been inserted, labeled "[OAuth Provider Name] default_profile".
This newly created OAuth Entity Profile is what you will use in tandem with any HTTP Request (REST Method) to authenticate that request.

And there you have it; your OAuth 2.0 is ready to use!
Setting up OAuth is excellent, but there is no point unless you can create an HTTP Request to use that OAuth. If you need help setting up an HTTP Request, check out my other article, How to make an HTTP Request (REST Method) within ServiceNow.
Comments