Professional Documents
Culture Documents
ServiceNow OAuth 2.0 Endpoint Integration by Revanth Karra
ServiceNow OAuth 2.0 Endpoint Integration by Revanth Karra
ServiceNow OAuth 2.0 Endpoint Integration by Revanth Karra
OAuth 2.0
Endpoint Integration
1
Benefits:
Security: You don't share your passwords with other applications, reducing
the risk of unauthorized access.
Convenience: It simplifies the process of connecting different applications
and services.
Control: You have control over what information you share with each
application.
Benefits:
Enhanced Security: Eliminates sharing ServiceNow credentials with external
apps, reducing the risk of unauthorized access.
Improved User Experience: Streamlines the authorization process, providing
a more user-friendly experience for interacting with external applications.
Granular Control: Grants external applications access to specific resources
(scopes) within ServiceNow, minimizing potential security vulnerabilities.
REVANTH KARRA 1
2
Click on “Application Registry” and click “New” on the top right corner.
And in here we’ll click “Create an OAuth API endpoint for external clients”
REVANTH KARRA 2
3
As we can see our “OAuth API Demo” was created successfully. Let us click on
it.
REVANTH KARRA 3
4
Now, navigate to the address bar and copy the link of our Instance.
Let us go to postman application and past the URL and type “oauth_token.do”
and set the http request to “POST” method.
REVANTH KARRA 4
5
Let’s get started, for “client_id”, we must go to our instance and copy the
“Client ID”.
Now, for “client_secret”, we need to click on the lock icon and our client secret
value will be revealed. Copy the “Client Secret”.
For username and password, you need to paste your Instance credentials.
REVANTH KARRA 5
6
For grabbing your Instance credentials, you can navigate to Home and click on
your profile icon.
Now, click on “Manage Instance password”. Here you can get your Instance
credentials.
Now, go to postman and select “Authorization” and set Type to “No Auth”.
And now, as we are initially using username and password. Kindly, set
“grant_type” to “password”.
REVANTH KARRA 6
7
Here we need to uncheck the checkbox for both username and password and
create “refresh_token” and paste the “refresh_token” value from the response.
Now, we need to create another request, which is “GET” method and set the
endpoint, in our case we are using Incident table. So, we used
“/api/now/table/incident”.
REVANTH KARRA 7
8
So, we need to set “Auth Type” to “Bearer Token” in our “GET” method.
Now, copy the “access_token” from the “POST” response and paste it in “GET”
method under Token column.
Click “Send”.
Now, let us try another method for getting the response using “GET” method.
REVANTH KARRA 8
9
Remember, to place “Bearer” before the “access_token” and give some space
between these two(“Bearer” and “access_token”).
Select the checkbox for Authorization, Accept and Content-Type.
REVANTH KARRA 9
10
For checking the Access Token, you need to navigate to the “POST” and click
“Send” and cross verify the access token in the response field. Only then you
will get the response in any case (both methods).
Conclusion:
ServiceNow OAuth 2.0 empowers you to securely connect external applications to
your ServiceNow instance, fostering a more integrated and user-friendly workflow. By
leveraging this authorization framework, you can unlock the full potential of your
ServiceNow environment while maintaining robust security protocols.
REVANTH KARRA 10