> ## Documentation Index
> Fetch the complete documentation index at: https://docs.incident.io/llms.txt
> Use this file to discover all available pages before exploring further.

# ServiceNow

We have a ServiceNow integration to keep your incidents in sync with incident.io.

For teams running their operations in ServiceNow, we know how important it is to preserve the structured record-keeping you rely on. This integration closes the loop between fast-moving incident response in Slack or Microsoft Teams and the structured processes in ServiceNow, so you get the best of both worlds without duplicate effort.

This document will explain how to connect ServiceNow to [incident.io](http://incident.io/).

## Connecting ServiceNow

incident.io connects to ServiceNow using an **OAuth app** and **Web Service user account**. Let's get started with the OAuth app.

<Warning>
  You will need a ServiceNow Admin to complete these steps.
</Warning>

## 1. Create an OAuth App

Log in to ServiceNow and search for "**OAuth**" in the filter navigation:

<img src="https://mintcdn.com/incidentio-18bb4170/3405jn_jWz4xmTr-/images/help-centre/servicenow/screenshot-1.png?fit=max&auto=format&n=3405jn_jWz4xmTr-&q=85&s=bc411d93ecab86c19db1a71f1017102e" alt="" width="810" height="896" data-path="images/help-centre/servicenow/screenshot-1.png" />

Select **Application Registry**, and click **New**.

<img src="https://mintcdn.com/incidentio-18bb4170/H5xxW76jdeWwMFHI/images/help-centre/servicenow/screenshot-2.png?fit=max&auto=format&n=H5xxW76jdeWwMFHI&q=85&s=2b9192b6959a26d828c8dc382b80dcba" alt="" width="1230" height="720" data-path="images/help-centre/servicenow/screenshot-2.png" />

Select **New Inbound Integration Experience**.

<img src="https://mintcdn.com/incidentio-18bb4170/H5xxW76jdeWwMFHI/images/help-centre/servicenow/screenshot-3.png?fit=max&auto=format&n=H5xxW76jdeWwMFHI&q=85&s=e6d78e6f9282d22c0cfc6308199f0bd0" alt="" width="3000" height="664" data-path="images/help-centre/servicenow/screenshot-3.png" />

Click **New Integration.**

<img src="https://mintcdn.com/incidentio-18bb4170/H5xxW76jdeWwMFHI/images/help-centre/servicenow/screenshot-4.png?fit=max&auto=format&n=H5xxW76jdeWwMFHI&q=85&s=7196b244ce2877fe716d220d0e885004" alt="" width="1590" height="1366" data-path="images/help-centre/servicenow/screenshot-4.png" />

Click **OAuth - Resource owner password credential grant.**

Enter 'incident.io' for the name, and add 'useraccount' to the Auth Scopes section. Leave other options as the defaults:

<img src="https://mintcdn.com/incidentio-18bb4170/H5xxW76jdeWwMFHI/images/help-centre/servicenow/screenshot-5.png?fit=max&auto=format&n=H5xxW76jdeWwMFHI&q=85&s=0a31b39fc444cc5fc3c6b7a55adae76a" alt="" width="2550" height="1326" data-path="images/help-centre/servicenow/screenshot-5.png" />

Find the app you've just created in the list. Copy the **Client ID** and **Client Secret** values: we'll need them later!

## 2. Create a Web Service Account

<Info>
  Any ServiceNow user account can be used so long as it has the relevant roles assigned. However, any actions taken by incident.io in ServiceNow will appear as being taken by this user account, so we strongly recommend creating a user for this purpose only.
</Info>

In ServiceNow, search for '**User Administration**' in the filter navigation:

<img src="https://mintcdn.com/incidentio-18bb4170/H5xxW76jdeWwMFHI/images/help-centre/servicenow/screenshot-6.png?fit=max&auto=format&n=H5xxW76jdeWwMFHI&q=85&s=377c070ef1e049ca8d3ee75a87ab04e9" alt="" width="988" height="842" data-path="images/help-centre/servicenow/screenshot-6.png" />

Select **Users**, then click **New** in the top-right.

Select a **username** and **email**, for example 'incident.io' and '[incidentio-service@my-domain.com](mailto:incidentio-service@my-domain.com)':

<img src="https://mintcdn.com/incidentio-18bb4170/H5xxW76jdeWwMFHI/images/help-centre/servicenow/screenshot-7.png?fit=max&auto=format&n=H5xxW76jdeWwMFHI&q=85&s=18edbbd7cef69611596f3c8646843612" alt="" width="2978" height="1080" data-path="images/help-centre/servicenow/screenshot-7.png" />

Make sure **Password needs reset** and **Locked out** are not selected, and **Active** is selected.

Change the identity type to **Machine.**

Click **Submit**, then navigate to the newly-created user.

At the bottom, select the **Roles** tab, then **Edit..** Add the following roles:

* `admin`: allows us full access to your ServiceNow instance. This is the recommended approach, as it ensures all current and future features work without additional configuration.
  * If you don't wish to grant the `admin` role, create the user without the `admin` role and follow the [granular permissions](#granular-permissions) section below to create a custom role.

<img src="https://mintcdn.com/incidentio-18bb4170/UJ55xaxcPk42h3TF/images/help-centre/servicenow/screenshot-8.png?fit=max&auto=format&n=UJ55xaxcPk42h3TF&q=85&s=6e46e071813756b5970b951533fd1f8f" alt="" width="1578" height="1042" data-path="images/help-centre/servicenow/screenshot-8.png" />

Click **Save** to apply these changes and return to the user page.

Click **Set Password**, then **Generate**, then **Save Password**.

<img src="https://mintcdn.com/incidentio-18bb4170/H5xxW76jdeWwMFHI/images/help-centre/servicenow/screenshot-9.png?fit=max&auto=format&n=H5xxW76jdeWwMFHI&q=85&s=e5f9ef3023db5f9e9718e0e6b8a8cac1" alt="" width="1280" height="494" data-path="images/help-centre/servicenow/screenshot-9.png" />

Copy the newly-generated password, we'll need it shortly! Make sure to update the record before coming back to [https://app.incident.io](https://app.incident.io/).

## 3. Installing the integration

We're now ready to install the ServiceNow integration in incident.io.

Go to [Settings → Integrations](https://app.incident.io/~/settings/integrations/servicenow), and click on **ServiceNow**, then **Connect**.

<img src="https://mintcdn.com/incidentio-18bb4170/H5xxW76jdeWwMFHI/images/help-centre/servicenow/screenshot-10.png?fit=max&auto=format&n=H5xxW76jdeWwMFHI&q=85&s=3f1719bc906f2dba8c970c4185a5c717" alt="" width="1074" height="1492" data-path="images/help-centre/servicenow/screenshot-10.png" />

Use the following details:

* Your **subdomain** is the part of the URL where you log in to ServiceNow. For example, if your ServiceNow instance is accessed at `hyper-payments.service-now.com`, your subdomain is `hyper-payments`.
* Your **OAuth Client ID** and **OAuth Client Secret** are the credentials you created in [part 1](#1-create-an-oauth-app) above.
* Your **Username** and **Password** are the credentials for the service account you created in [part 2](#2-create-a-web-service-account).
* Click **Connect** to verify your credentials and complete the connection

If you have any issues, please get in touch.

Next, you'll want to set-up your incident ticket to sync incidents to ServiceNow, which you can view steps to complete [here](/integrations/servicenow-sync).

## Granular Permissions

If you do not wish to grant the `Admin` role, you can set-up a custom role and assign it to the service user.

<Warning>
  Setting up granular permissions may mean that new features for ServiceNow are not available unless you manually update the role with new permissions.
</Warning>

### Custom Role

First, we need to create a new role for the service user.

Search for '**Roles**' and select the '**Roles**' option under '**Users and Groups**'.

<img src="https://mintcdn.com/incidentio-18bb4170/u3sODvWo3f5INXwZ/images/help-centre/servicenow/screenshot-11.png?fit=max&auto=format&n=u3sODvWo3f5INXwZ&q=85&s=85706326ea08eb8952553f7e6d5be79e" alt="" width="748" height="976" data-path="images/help-centre/servicenow/screenshot-11.png" />

Click **New**.

<img src="https://mintcdn.com/incidentio-18bb4170/u3sODvWo3f5INXwZ/images/help-centre/servicenow/screenshot-12.png?fit=max&auto=format&n=u3sODvWo3f5INXwZ&q=85&s=bf640b398367c31fd705068fe0ea410a" alt="" width="3008" height="266" data-path="images/help-centre/servicenow/screenshot-12.png" />

Create a new role named `incident.io Application Role`.

<img src="https://mintcdn.com/incidentio-18bb4170/UJ55xaxcPk42h3TF/images/help-centre/servicenow/screenshot-13.png?fit=max&auto=format&n=UJ55xaxcPk42h3TF&q=85&s=dedfa8886c579088549b9dd4859c6ebc" alt="" width="2786" height="804" data-path="images/help-centre/servicenow/screenshot-13.png" />

### ACLs

Next, we need to create new ACLs that grant read-only access to the data and UI policies.

To add new ACLs, you first need to elevate your user to Security Admin.

Click your profile icon and select '**Elevate role**'.

<img src="https://mintcdn.com/incidentio-18bb4170/UJ55xaxcPk42h3TF/images/help-centre/servicenow/screenshot-14.png?fit=max&auto=format&n=UJ55xaxcPk42h3TF&q=85&s=9ff067e9591bb2127cb9b709a0589b61" alt="" width="570" height="898" data-path="images/help-centre/servicenow/screenshot-14.png" />

Click '**security\_admin**' and then '**Update**'.

<img src="https://mintcdn.com/incidentio-18bb4170/UJ55xaxcPk42h3TF/images/help-centre/servicenow/screenshot-15.png?fit=max&auto=format&n=UJ55xaxcPk42h3TF&q=85&s=6efa62ef05cacbc1f1acfe3600533ea4" alt="" width="1200" height="646" data-path="images/help-centre/servicenow/screenshot-15.png" />

Search for '**Access Control**' and select '**Access Control (ACL)**' under 'System Security'.

<img src="https://mintcdn.com/incidentio-18bb4170/UJ55xaxcPk42h3TF/images/help-centre/servicenow/screenshot-16.png?fit=max&auto=format&n=UJ55xaxcPk42h3TF&q=85&s=542975fa9f5a5bd72ac7604d013ac12d" alt="" width="760" height="734" data-path="images/help-centre/servicenow/screenshot-16.png" />

We need to create 5 new ACLs to read the following tables:

* `sys_ui_policy`
* `sys_ui_policy_action`
* `sys_data_policy`
* `sys_data_policy_rule`
* `sys_journal_field`

Select '**New**'.

<img src="https://mintcdn.com/incidentio-18bb4170/UJ55xaxcPk42h3TF/images/help-centre/servicenow/screenshot-17.png?fit=max&auto=format&n=UJ55xaxcPk42h3TF&q=85&s=dcfe30b18c7c1ba876a6892cb0aa6281" alt="" width="3008" height="250" data-path="images/help-centre/servicenow/screenshot-17.png" />

Create a new Access Control record with the following properties:

* **Type**: `record`
* **Operation**: Change from `create` to `read`
* **Application**: `Global`
* **Active**: checked
* **Decision Type**: `Allow If`
* **Admin overrides**: checked
* **Name**: Type the table name in the first dropdown.
  * Leave the second dropdown as `-- None --`.

<img src="https://mintcdn.com/incidentio-18bb4170/UJ55xaxcPk42h3TF/images/help-centre/servicenow/screenshot-18.png?fit=max&auto=format&n=UJ55xaxcPk42h3TF&q=85&s=0088357ea1c0fa0ed9490ee65f5f3d72" alt="" width="3008" height="1082" data-path="images/help-centre/servicenow/screenshot-18.png" />

Click '**Submit**'. You will be prompted to select a role. Select the role you created earlier.

<img src="https://mintcdn.com/incidentio-18bb4170/UJ55xaxcPk42h3TF/images/help-centre/servicenow/screenshot-19.png?fit=max&auto=format&n=UJ55xaxcPk42h3TF&q=85&s=961b0b24c8b5bc066853ad1e9c6daa70" alt="" width="1220" height="742" data-path="images/help-centre/servicenow/screenshot-19.png" />

Click '**OK**' and then click '**Update**' to save the ACL.

Repeat this for each table, so that you have 5 new ACLs created:

* `sys_ui_policy`
* `sys_ui_policy_action`
* `sys_data_policy`
* `sys_data_policy_rule`
* `sys_journal_field`

<img src="https://mintcdn.com/incidentio-18bb4170/UJ55xaxcPk42h3TF/images/help-centre/servicenow/screenshot-20.png?fit=max&auto=format&n=UJ55xaxcPk42h3TF&q=85&s=de65678175f4deb1876418fee53d65a9" alt="" width="1318" height="188" data-path="images/help-centre/servicenow/screenshot-20.png" />

### Assign Roles To The Service User

Now that we have the role and the ACLs, we need to add the required roles to our user.

Search for '**User Administration**' in the filter navigation:

<img src="https://mintcdn.com/incidentio-18bb4170/UJ55xaxcPk42h3TF/images/help-centre/servicenow/screenshot-21.png?fit=max&auto=format&n=UJ55xaxcPk42h3TF&q=85&s=370844b1a6fffe5ee0c4d15c984717b5" alt="" width="988" height="842" data-path="images/help-centre/servicenow/screenshot-21.png" />

Select '**Users'**, then select the user you created for incident.io.

At the bottom, select the '**Roles'** tab, then **Edit...** Add the following roles:

* `cmdb_read`: allows us to read data from your Configuration Management Database.
* `sn_cmdb_user`: allows us to read information about users and groups in your ServiceNow account.
* `incident_manager`: allows us to sync incident data into ServiceNow incident records.
* `incident.io Application Role`: allows us access to UI and data policies, as well as work notes on incidents.

<img src="https://mintcdn.com/incidentio-18bb4170/UJ55xaxcPk42h3TF/images/help-centre/servicenow/screenshot-22.png?fit=max&auto=format&n=UJ55xaxcPk42h3TF&q=85&s=2d5ec30279f5fd5f7437e54e75c33726" alt="" width="1602" height="834" data-path="images/help-centre/servicenow/screenshot-22.png" />

Click **Save** to apply these changes and then **Update** to save the user.
