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

# Connect ServiceNow with OAuth 2.0 (Client Credentials) – StackOne Hub

> Link a ServiceNow account in the StackOne Hub using OAuth 2.0 (Client Credentials). End-user guide to authorize the integration and start using ServiceNow actions.

> [!WARNING]
>
> Setting this up requires the `admin` role in your ServiceNow instance. If a REST API access policy restricts the Table API, add an OAuth authentication profile to that policy. Do not give the service account `admin` itself; without it, updating or deleting records on the base `task` table fails, because ServiceNow's access controls allow that only for `admin`.

## Set up the OAuth client

The client credentials grant is off by default, and every client acts as one ServiceNow user whose roles decide what StackOne can reach.

**1. Turn on the client credentials grant**

Sign in to your ServiceNow instance with the application scope set to **Global**.

<ul>
  <li>In the navigation filter, enter `sys_properties.list`.</li>
  <li>Click **New**.</li>
  <li>**Name**: `glide.oauth.inbound.client.credential.grant_type.enabled`</li>
  <li>**Type**: **true | false**</li>
  <li>**Value**: `true`</li>
  <li>Click **Submit**.</li>
</ul>

![The new System Property form with the Name, Type and Value fields and the Submit button highlighted](https://mintcdn.com/stackone-60/gLpoxUM6FS4jWkPG/connectors/servicenow/images/oauth2_client_credentials-config-system-property.png?fit=max\&auto=format\&n=gLpoxUM6FS4jWkPG\&q=85\&s=6a9a388f03e5fb8dce79f35919af114d)

**2. Create the service account**

Open **User Administration** > **Users**.

<ul>
  <li>Click **New**.</li>
  <li>**User ID**: `stackone_integration`</li>
  <li>**Identity type**: **Machine**</li>
  <li>Select **Internal Integration User**.</li>
  <li>Click **Submit**.</li>
</ul>

![The new User form with the User ID, Identity type and Internal Integration User fields and the Submit button highlighted](https://mintcdn.com/stackone-60/gLpoxUM6FS4jWkPG/connectors/servicenow/images/oauth2_client_credentials-config-service-account.png?fit=max\&auto=format\&n=gLpoxUM6FS4jWkPG\&q=85\&s=4cc530aea0e4f46c672c56ea6c4f4a2a)

**3. Add the roles**

Open the new user's record.

<ul>
  <li>Select the **Roles** tab.</li>
  <li>Click **Edit...**.</li>
  <li>Add `itil` for incidents, problems, changes, tasks and catalog requests.</li>
  <li>Add only the roles for the actions you use: `itil_admin` for deletes, `catalog_admin` to delete catalog requests, `business_rule_admin` for webhooks, `personalize_dictionary` for table schema actions, `knowledge_admin` for knowledge bases and categories, and `user_admin` for users, groups and role assignments.</li>
  <li>Save the role list.</li>
</ul>

![The Roles tab of the user record with the Edit button highlighted](https://mintcdn.com/stackone-60/gLpoxUM6FS4jWkPG/connectors/servicenow/images/oauth2_client_credentials-config-roles.png?fit=max\&auto=format\&n=gLpoxUM6FS4jWkPG\&q=85\&s=0db71061f4ff94af5b084c3e09417b21)

**4. Start a new integration**

Open **Machine Identity Console** > **Inbound integrations**.

<ul>
  <li>Click **New integration**.</li>
  <li>Select **OAuth - Client credentials grant**.</li>
</ul>

![The Select your application connection type dialog with OAuth - Client credentials grant highlighted](https://mintcdn.com/stackone-60/gLpoxUM6FS4jWkPG/connectors/servicenow/images/oauth2_client_credentials-config-connection-type.png?fit=max\&auto=format\&n=gLpoxUM6FS4jWkPG\&q=85\&s=711b0ca91758d2fd88901f8af28cf159)

**5. Fill in the details and save**

In the **Details** section, link the integration to the service account.

<ul>
  <li>**Name**: `StackOne Integration`</li>
  <li>**Provider name**: `StackOne`</li>
  <li>**OAuth application user**: the service account</li>
  <li>**Auth scope**: `useraccount`</li>
  <li>Click **Save**.</li>
</ul>

![The Details section with the Name, Provider name and OAuth application user fields highlighted](https://mintcdn.com/stackone-60/gLpoxUM6FS4jWkPG/connectors/servicenow/images/oauth2_client_credentials-config-details.png?fit=max\&auto=format\&n=gLpoxUM6FS4jWkPG\&q=85\&s=17ddd6592fa74e07c49c2c5a75284f1a)

**6. Copy the credentials**

Open the saved integration from **Inbound integrations**. Copy the **Client ID** and **Client secret** across.

<ul>
  <li>Click the copy icon beside **Client secret** to copy it.</li>
</ul>

![The saved integration with the Client ID field and the Client secret copy button highlighted](https://mintcdn.com/stackone-60/gLpoxUM6FS4jWkPG/connectors/servicenow/images/oauth2_client_credentials-config-credentials.png?fit=max\&auto=format\&n=gLpoxUM6FS4jWkPG\&q=85\&s=5cd83774490b8abafc3ae7c853f10abf)

## Find your instance name

Your instance name is the first part of your ServiceNow URL.

<ul>
  <li>Format: `https://{instance}.service-now.com`</li>
  <li>Example: if your URL is `https://dev12345.service-now.com`, your **Instance Name** is `dev12345`</li>
</ul>

## Link the Account

**1. Connect**

<ul>
  <li>Click **Connect**.</li>
  <li>If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider's authorization flow.</li>
  <li>Once authorization is successful, you will see a confirmation popup.</li>
</ul>

**2. Use Actions**

Connect an AI platform to the linked account's actions. See [AI Platforms](https://docs.stackone.com/ai-platforms/overview.md).

Other ways to call actions are listed in [Protocols & SDKs](https://docs.stackone.com/connect/protocols-and-sdks.md).

## Next Steps

> [card] [Webhooks setup](https://docs.stackone.com/connectors/servicenow/guides/webhook-setup.md)
>
> Configure receiving Events for ServiceNow into StackOne.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.