ServiceNow

Modified on Tue, 12 Aug at 2:36 PM

TABLE OF CONTENTS



Authentication


To Authenticate to ServiceNow you must provide the Client Id and Client Secret of a ServiceNow OAuth Client Application.


And then you can optionally 

  1. Provide a refresh token, please note this token will eventually expire depending on settings in the ServiceNow OAuth Client Application

  2. Provide a Username/Password pair, please note the username/password will be used to authenticate once per session and the importer uses the ServiceNow provided RefreshToken for subsequent authentication. Be aware that the importer does not update the SN Refresh Token field, it is a purely manual field. 



SN API Key

This is the Client Id of a ServiceNow OAuth Client Application.


SN Secret

This is the Client Secret of the ServiceNow OAuth Client Application identified above.


SN Account Username

This is the Username of a ServiceNow Account.


SN Account Password

This is the Password of the ServiceNow Account identified above.


SN Refresh Token

This is an optional ServiceNow OAuth Refresh Token.


N.B.


An account's ServiceNow permissions determine what it can and cannot see via the REST API.

For instance, a standard user can not see all fields whereas an Admin level account can.


ServiceNow OAuth Client Application

In order to Authenticate with ServiceNow you need to set up an Application in the Application registry.


Type "Application Registry" into the search box in the All section of ServiceNow.

You will find "Application Registry" under "System OAuth". It might not be a bad idea to add this to your favourites.


You will then be presented with the list of Registered Applications, Click New to create your ManagementStudio OAuth Application.



When asked What kind of OAuth Application select "Create an OAuth API endpoint for external clients".

 


Now

  1. Give the OAuth Application a Name
  2. Provide a Client Secret or leave blank to have one automatically generated.
  3. Change Client Type to "Integration as a Service".
  4. Click Submit




You can now take the Client ID and Client Secret and supply them to ManagmentStudio via the Connection Options panel.

Click Here to return to the Authentication section.



ServiceNow REST APIS


In order to see what REST APIs are available you will need to use the ServiceNow REST API Explorer.

 


  1. Select the All tab in the ServiceNow Menubar.
  2. In the search start typing "REST API Explorer" (minus the quotes)
  3. Under System Web Services\REST select REST API Explorer (Adding to favourites might be usefull)



  1. API Namespace (Defaults to now)
  2. API Name (Defaults to Table API)
  3. API Version (Defaults to Latest)
  4. tableName, This is where you select the ServiceNow table you want to read from.
  5. sysparm_fields, this is where you can select the fields from the selected table in step 4 that you wish to read.


In the above Example with the "User (sys_user)" table selected clicking the 1) sysparm_fields' edit icon a 2) window appears allowing you to select and order the fields you wish to include in the query.


In order to send the query scroll down to and click the 1) Send button, the query response details will appear under this button once completed.




The next two settings of note are 

1) sysparm_display_value

2) sysparm_exclude_reference_link



if left at defaults they produce output like the following.

As you can see the sys_domain field is showing both its value and a link to its home address on the sys_user_group table.


whereas if we set sysparm_exclude_reference_link to true we get just the data as per (1) below. Setting this value to true is a prerequeset in the ManagamentStudio ServiceNow Importer.

By using the sysparm_display_value parameter we can control whether the result includes the display value (true) or the actual value (false/default).



Further Support

If you require further support, please visit ManagementStudio's Service Desk to search the knowledge base or create a new support ticket.


 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article