> For the complete documentation index, see [llms.txt](https://docs.balkan.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.balkan.id/getting-started/setting-up-your-tenant/application-integrations/direct-application-integrations/service-now-integration-setup.md).

# Service Now Integration Setup

### Getting Started

This guide walks you through provisioning a ServiceNow instance and configuring a secure OAuth 2.0 Client Credentials connection for BalkanID

### Requirements:

* ***Instance Name***
* ***Client ID***
* ***Client secret***

### Getting the Configuration

#### How to ***Instance Name***, ***Client ID***, and ***Client secret***

***

#### Phase 1: ServiceNow Configuration

Note - Validate that the following four plugins are installed. This can be done by navigating to `Admin -> Application Manager`, or by navigating to `sys_plugins.list` using the Filter Navigator (UI15/16). Please install any that are not installed.

* `OAuth 2.0` (com.snc.platform.security.oauth)
* `REST API Provider` (com.glide.rest)
* `Authentication scope` (com.glide.auth.scope)
* `REST API Auth Scope Plugin` (com.glide.rest.auth.scope)

*Note: From Washington DC environment all four were already installed*

#### Step 1: Enable the "Client Credentials" Flow

By default, ServiceNow blocks machine-to-machine OAuth for security. You must enable it globally first.

1. In the **Filter Navigator** (left sidebar), type `sys_properties.list` and hit Enter.<br>

   <div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2Ft5eO90meQhPp7HxoyWc5%2Fimage.png?alt=media&amp;token=3b4b545f-6cc3-4a82-9a64-56c5386e72be" alt=""><figcaption></figcaption></figure></div>

   \
   a. Search for: `glide.oauth.inbound.client.credential.grant_type.enabled.`

   <div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FzzyzmINqVNs5B9Te9uQ1%2Fimage.png?alt=media&amp;token=205194bb-9366-4370-9559-8c0dafb749d1" alt=""><figcaption></figcaption></figure></div>

   2. If the value is **false**, double-click it and change it to **true**.
   3. *If it doesn't exist:* Click **New**, name it exactly that, set Type to `true/false`, and Value to `true`.

   <div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FmYOlHj2KUpEh4WlEcXqa%2Fimage.png?alt=media&amp;token=bee64098-2618-41b8-8428-721be65bd6f1" alt=""><figcaption></figcaption></figure></div>

   <div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2Fjckzh6eAalxQ3878wYVY%2Fimage.png?alt=media&amp;token=b27db86e-3019-4447-a39c-85923ff25781" alt=""><figcaption></figcaption></figure></div>

#### Step 2: Create the Service User

Every integration needs a "User Identity" to determine what data it is allowed to see.

1. Navigate to **User Administration > Users** and click **New**.<br>

   <div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FkaPvwB7ABCOsbKd0ipmo%2Fimage.png?alt=media&amp;token=713060b5-deea-46a1-8105-7de04997d2e0" alt=""><figcaption></figcaption></figure></div>
2. **Fill out the User form:**
   * **User ID**: `balkanid_service`
   * **Internal Integration User**: **Check this box** (Prevents password expiration and UI login).
3. **Submit** the record, then reopen it.<br>

   <div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2F6vNZ65oG61XV4X5agmfF%2Fimage.png?alt=media&amp;token=395d1bfd-1c7c-40d7-99aa-f17513b54c1e" alt=""><figcaption></figcaption></figure></div>
4. **Assign Permissions**: Scroll to the **Roles** related list at the bottom:
   * Click **Edit**.
   * Add `snc_platform_rest_api_access` (required for API access).
   * Add `itil` (required to read role and group membership tables such as `sys_user_has_role`, `sys_group_has_role`, and `sys_user_grmember`).
   * Add `admin` (required to read OAuth credential inventory from `oauth_entity` and `oauth_credential` for [ServiceNow credential discovery](/getting-started/entitlement-data-discovery/credentials-discovery/servicenow-credentials.md)).
   * Add `sn_hr_core.admin` (standard HR Admin role to sync Employees and Employments from ServiceNow HRSD). To add this role, refer to the [**ServiceNow Enable HRSD** ](#servicenow-enable-hrsd)section at the end of this documentation.
   * Click **Save**<br>

     <div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FSE5cxMLHkmQ2PicZfNF0%2Fimage.png?alt=media&amp;token=782c4d77-79db-4382-a54c-9331c024f103" alt=""><figcaption></figcaption></figure></div>

     <div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FzqbHovawNqh3l9082vug%2Fimage.png?alt=media&amp;token=37ccfa78-2ade-4ff3-b360-c4894bda9741" alt=""><figcaption></figcaption></figure></div>

#### Step 3: Create the OAuth Application

This creates the "Client ID" and "Client Secret" that BalkanID will use to identify itself.

#### OAuth Flow for old releases

1. In the Filter Navigator, type **Application Registry** and navigate to **System OAuth > Application Registry**.<br>

   <div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FHjq3aucHzgTczjxGu7xI%2Fimage.png?alt=media&amp;token=ff5cf2fd-2d40-4221-8e7b-2a4919e9c1ae" alt=""><figcaption></figcaption></figure></div>
2. Click **New and Select “Create an OAuth API endpoint for external clients”**<br>

   <div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FWJQW75QwbR4EC4bHhk1E%2Fimage.png?alt=media&amp;token=e583eda8-230b-4c1a-9870-ed80cf691b57" alt=""><figcaption></figcaption></figure></div>
3. **Fill out the form as follows:**
   * Name: `BalkanID-app`
   * **Client Type:** Choose any friendly label (your choice).
   * **OAuth application user:** Select the OAuth application user from the dropdown. This should be the **Service User** you created earlier in Step 2 or the user with admin access.\
     Note if you don’t see this as shown in below screenshot follow Step 4 to select the **OAuth application user.**
   * **Client Secret:** Leave this fields **blank**. ServiceNow generates these automatically after you save.
4. **Save the Record**: Click the submit button.
5. **Retrieve Keys**:

   Go back and find newly created OAuth Provide name “BalkanID-app” open it by clicking on name

   * Copy the **Client ID**.
   * Click the **Lock Icon** next to **Client Secret** to reveal and copy it.

   <div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FBxrc5WevCSg5Fe9p8ZNw%2Fimage.png?alt=media&amp;token=b3d4068c-f701-4c48-8b70-0d3d5c991dca" alt=""><figcaption></figcaption></figure></div>

#### OAuth Flow for new release (Zurich)

1. In the Filter Navigator, type Application Registry and navigate to System OAuth > Application Registry.<br>

   <div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FHjq3aucHzgTczjxGu7xI%2Fimage.png?alt=media&amp;token=ff5cf2fd-2d40-4221-8e7b-2a4919e9c1ae" alt=""><figcaption></figcaption></figure></div>
2. Click **New** and **New Inbound Integration Experience > New Integration >**\
   \
   **OAuth - Client credentials grant.**<br>

   <div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FOcPp6aFwR2vPsPhoJbbS%2Fimage.png?alt=media&amp;token=c36e4c51-0a33-4451-9acb-42a819043629" alt=""><figcaption></figcaption></figure></div>
3. **Fill out the form as follows:**
   * **Name:** `BalkanID-app`
   * **Provider name:** Choose any friendly label (your choice).
   * **OAuth application user:** Select the OAuth application user from the dropdown. This should be the **Service User** you created earlier in Step 2 or the user with admin access.
   * **Auth scope:** Choose the required scope from the list provided below.
   * **Client ID / Client Secret:** Leave both fields **blank**. ServiceNow generates these automatically after you save.
   1. **Save the Record**: Right-click the header and select **Save**.
   2. **Retrieve Keys**:
      * Copy the **Client ID**.
      * Click the **Lock Icon** next to **Client Secret** to reveal and copy it.

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FAa903p1K20ejcrLUkeyX%2Fimage.png?alt=media&amp;token=0f38ff0f-457e-48ec-bf24-7eaa9c879e8b" alt=""><figcaption></figcaption></figure></div>

#### **Step 4: Link the User to the OAuth App (The "Bridge")**

**This is the most critical step.** This tells ServiceNow: *"When BalkanID uses these keys, act as the `balkanid_service` user."*

1. Go back to your **Application Registry** record (`BalkanID-app`).
2. Locate the field **OAuth Application User**.
   * *Note: If you don't see it, right-click the header > **Configure > Form Layout > move "OAuth Application User" to the right side > Save.***
3. Search for and select your **`balkanid_service`** user in this field.
4. Click **Update**.

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FU6OIpT9Vli3usdshx7On%2Fimage.png?alt=media&amp;token=b5568ef2-d117-466c-b6d3-e57a5d65ca6b" alt=""><figcaption></figcaption></figure></div>

#### OAuth credential read permissions

To discover **OAuth clients** and **OAuth tokens** in ServiceNow, the OAuth application user must be able to read `oauth_entity` and `oauth_credential` through the Table API. In most instances this requires the `admin` role on the service user created in [Step 2](#step-2-create-the-service-user).

Without read access to these tables, BalkanID still syncs users, groups, and roles, but OAuth credential inventory is skipped and the integration message may note that credential tables were unavailable.

{% hint style="info" %}
**Early Access:** [Credentials discovery](/getting-started/entitlement-data-discovery/credentials-discovery/servicenow-credentials.md) for ServiceNow requires **IGA for Non-Human Identities (NHI)** to be enabled for your tenant. For what BalkanID surfaces after sync, see [ServiceNow: Credentials](/getting-started/entitlement-data-discovery/credentials-discovery/servicenow-credentials.md).
{% endhint %}

BalkanID reads credential metadata only. Client secrets, token values, and password fields are never requested.

Required Table API access:

| Table              | BalkanID credential type | Minimum service-user access |
| ------------------ | ------------------------ | --------------------------- |
| `oauth_entity`     | OAuth client             | `admin` (typical)           |
| `oauth_credential` | OAuth token              | `admin` (typical)           |

#### AI Agent Studio agent read permissions

To discover **AI Agent Studio agents**, the instance must have the **Agentic AI** capabilities installed and the OAuth application user must be able to read agent inventory tables. Optional enrichment uses the AI Assets Inventory API when available.

If agent tables are unavailable (missing plugin, insufficient ACLs, or optional table read failure), BalkanID logs the skip and continues the identity and entitlement sync.

{% hint style="info" %}
**Early Access:** [Agents](/agents/introduction-to-agents.md) discovery must be enabled for your tenant, in addition to NHI. For what BalkanID surfaces after sync, see [ServiceNow: Agents](/agents/onboarding-agents/discovering-agents-from-integrations/servicenow-agents.md).
{% endhint %}

1. In the **Filter Navigator**, open **Plugins** and confirm **Agentic AI** (and related AI Agent Studio components) are installed on your instance.
2. Ensure the OAuth application user from [Step 2](#step-2-create-the-service-user) can read the agent tables below. Production ACLs vary by instance; `admin` on the service user is the typical starting point for pilot deployments such as AI Agent Studio inventory.

Required and optional reads:

| Table / API                                             | Purpose                                 | Required for agent sync    |
| ------------------------------------------------------- | --------------------------------------- | -------------------------- |
| `sn_aia_agent`                                          | Agent inventory                         | Yes                        |
| `sn_aia_agent_config`                                   | Run-as user, model, execution mode      | Yes                        |
| `sn_aia_tool_m2m`                                       | Tool count metadata                     | No — skipped if unreadable |
| `sys_agent_access_role_configuration`                   | Agent → role access paths               | No — skipped if unreadable |
| AI Assets Inventory API (`alm_ai_system_digital_asset`) | Governance enrichment (lifecycle, risk) | No — best-effort           |

#### ServiceNow Enable HRSD

1. Login to your Servicenow instance ([https://{{instance}}.service-now.com](https://dev269449.service-now.com/))
2. In the **Filter Navigator** (left sidebar) search Plugins<br>

   <div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FVdgszBVf0gGibfVW6RrN%2Fimage.png?alt=media&amp;token=62c1c6ab-aebd-42a4-8e5e-64dbfa0bd607" alt=""><figcaption></figcaption></figure></div>
3. Search for **Human Resources Scoped App: Core**<br>

   <div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FOBBByZnqFHHK7WvLyLPj%2Fimage.png?alt=media&amp;token=837bfdb6-df36-4b5f-a04b-e5c96bf465fb" alt=""><figcaption></figcaption></figure></div>
4. Install it and load the demo data if required
5. Then, Navigate to **User Administration > Users**\
   Search for the Service User created in Phase 1 - Step 3
6. **Assign Permissions**: Scroll to the **Roles** related list at the bottom:
   * Click **Edit**.
   * Add `sn_hr_core.admin` (Required for Standard HR Admin Role to sync Employees, Employments from ServiceNow HRSD)
   * Click **Save**.

#### ServiceNow Enable CustomerService

1. Login to your Servicenow instance ([https://{{instance}}.service-now.com](https://dev269449.service-now.com/))
2. In the **Filter Navigator** (left sidebar) search Plugins<br>

   <div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FVdgszBVf0gGibfVW6RrN%2Fimage.png?alt=media&amp;token=62c1c6ab-aebd-42a4-8e5e-64dbfa0bd607" alt=""><figcaption></figcaption></figure></div>
3. Search for **Customer Service Management**\
   **Plugin id**: `com.sn_customerservice`<br>

   <div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2F4q1sJL15Mtr63QBzfmMw%2Fimage.png?alt=media&amp;token=95307c78-cff6-4d7a-a8b9-42b118f276de" alt=""><figcaption></figcaption></figure></div>
4. Install it and load the demo data if required
5. Then, Navigate to **User Administration > Users**\
   Search for the \*\*\*\*Service User created in Phase 1 - Step 3
6. **Assign Permissions**: Scroll to the **Roles** related list at the bottom:
   * Click **Edit**.
   * Add `sn_customerservice.customer_admin` and `sn_customerservice.customer`\
     (Required for Standard Customer Admin Role)
   * Click **Save**.

#### Configure integration within your BalkanID tenant

1. Login to the BalkanID application and switch to the tenant you would like to add your integration to.
2. Head to *Integrations* > **Add Integration**, select **ServiceNow.**

   <div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FXRvzAfUdpqlc7iQZT5Na%2Fimage.png?alt=media&amp;token=43dd9897-4221-45f6-b341-f15fd50fa14a" alt=""><figcaption></figcaption></figure></div>

   <div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FqM6sA1Fjy5oKZUNesZGu%2FScreenshot%202026-08-18%20at%2010.41.41%E2%80%AFPM.png?alt=media&amp;token=07c7094b-ad09-4769-8515-f3c860bacb60" alt=""><figcaption></figcaption></figure></div>
3. Set up the *Primary Application owner (mandatory)* and the *Description*, if any. Set up Secondary Application Owner(s), if any.<br>

   Select the Extraction Type. From here, you can configure your application using one of the following methods:

   1. **Direct integration** — Provide your **Instance name**, **Client ID**, and **Client secret** obtained above to set up a direct connection with BalkanID.
   2. **SCIM integration** - Provide SCIM server credentials to set up a SCIM connection with BalkanID.
   3. **Manual file upload** - Upload Entity and Entity Relations through a .CSV file upload. Contact the team for assistance with this.<br>

      <div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2Fq0G0p0OIiHdNoUgqryqn%2FScreenshot%202026-08-18%20at%2010.43.13%E2%80%AFPM.png?alt=media&amp;token=b541f1bb-2f2e-4071-a82b-a14b6b46c353" alt=""><figcaption></figcaption></figure></div>
4. Click on next to move onto *Optional Configuration.*
5. Fill **Optional configuration,** if required.

   <figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FWwMwzBtDCwYSplMbZBtP%2Fimage.png?alt=media&amp;token=0d22f002-4d7b-4d31-84c0-31b50ca63edd" alt="" width="563"><figcaption></figcaption></figure>
6. Once you filled in the information, click **Save**. Your integration is now configured and you will see the status of the integration displayed alongside other integrations on the *Integrations* page. When data is available, the integration Status will read **Connected** and the integration Message will read **Data available**.

Use **Data Sync Preferences** to control which entity types are extracted (users, groups, roles, OAuth clients, OAuth tokens, insights, and AI agents).

### Integration Scopes

| **Read Only (Access Review) Scopes**                                                                                                   | **Lifecycle Management Scopes** |
| -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
| `snc_platform_rest_api_access` (role)                                                                                                  | —                               |
| `itil` (role) — group and role membership tables                                                                                       | —                               |
| `admin` (role) — OAuth credential tables (`oauth_entity`, `oauth_credential`)                                                          | —                               |
| Agentic AI / AI Agent Studio table read access — see [AI Agent Studio agent read permissions](#ai-agent-studio-agent-read-permissions) | —                               |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.balkan.id/getting-started/setting-up-your-tenant/application-integrations/direct-application-integrations/service-now-integration-setup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
