DEV Community

Mariela Dimitrova for Software AG Tech Community

Posted on • Originally published at on

ServiceNow OAuth 2.0 Authentication


This article describes the step-by-step process of registering an application with ServiceNow tenant & generating the Access token as well as configuring the account in Integration.


• User needs to have a working ServiceNow tenant.

• User needs to have working Integration tenant.


• Create & configure an App in ServiceNow tenant.

• Generating the Access_token & Refresh_token using the rest client.

• Configuring the ServiceNow account in Integration.


  1. Login in to ServiceNow Portel.
  2. Search for the “OAuth” in the search bar & choose the “Application Registry” option under the System OAuth. image
  3. Register a new App, click “New” button. image
  4. Choose Create an OAuth API endpoint for external clients option. image
  5. Fill the details like Name , redirect_url & other mandatory information as mentioned in the screenshot then click Submit. image
  6. OAuth application is ready to use, we need to generate the authorization_code. To generate the code, user need to send the request call on the browser with below URL.
  7. After hiting the above url in the browser, user will get the prompt as mentioned in the screen shot, user needs to allow this by clicking on the ALlow. image
  8. Code will appear in the browser search bar, copy the entire URL & take the code. image image
  9. Now, will use the POSTMAN client, to generate the access token. As mentioned in the below steps: - POST Body: x-www-form-urlencoded grant_type: authorization_code code: redirect_uri: App redirect_uri. client_id: generated at the time of app creation. client_secret: generated at the time of app creation. image
  10. We will login to the tenant for making the connection of ServiceNow & chose the project.
  11. Choose the flowservice option & click + to make new flow. image
  12. Choose the ServiceNow application version from the drop down. image
  13. Choose the predefined operation from the drop down. image
  14. Click the Account configuration icon & choose the Configure Accounts Option then choose OAuth V2.0. image
  15. Fill the details mentioned on the page from the postman client & click Add. image
  16. After successful connection, to run the integration click run button as mentioned below. image
  17. Below are the results for the successful integration. image

Read full topic

Top comments (0)