> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/harness-platform/3.0/harness-platform-resources/connectors/ticketing-systems/connect-to-service-now.md). Agents can also search and read this documentation through its [MCP server](https://developer.harness.io/~gitbook/mcp).

# Connect to ServiceNow

Connect Harness to ServiceNow to use tickets in approval steps and ITSM workflows.

A ServiceNow connector lets Harness authenticate to your ServiceNow instance so you can use tickets in [approval steps](https://developer.harness.io/harness-platform/3.0/harness-platform-resources/overview/overview-1/approvals/service-now-approval.md) and ITSM workflows.

***

## What you will learn from this topic

* The permissions your ServiceNow account needs
* How to create a ServiceNow connector in the unified UI
* The authentication options available: Username/Password, ADFS Client Credentials with Certificate, and OIDC Refresh Token

***

## Before you begin

* **ServiceNow account permissions:** Your account should have the `admin` role. If that is not possible, it needs at minimum the `itil_admin` or `itil` role to create and modify tickets, and the `import_admin` or `import_transformer` role to manage import set transform maps. For read-only use cases (polling ticket status only), the `itil` role is sufficient.
* **Harness secrets:** Store your credentials (password, certificates, or tokens) as Harness secrets before creating the connector. Go to [Add and reference text secrets](https://developer.harness.io/harness-platform/3.0/harness-platform-resources/secrets/add-use-text-secrets.md) to create one.

***

## Add a ServiceNow connector

To add a ServiceNow connector:

1. Go to **General Settings**.
2. Select **Connectors**.
3. Select **New Connector**, then select **ServiceNow**.
4. Enter a **Name**. The **Id** is auto-populated from the name.
5. In **Endpoint**, enter the base URL of your ServiceNow instance. For example, `https://yourcompany.service-now.com`.
6. In **Authentication**, select an auth method and fill in the required fields. Go to [Authentication options](#authentication-options) for details.
7. Select **Create**.

Harness validates the connection before saving.

***

## Authentication options

Select one of the following authentication methods.

### Username / Password

| Field        | Description                                       |
| ------------ | ------------------------------------------------- |
| **Username** | ServiceNow username.                              |
| **Password** | A Harness secret containing the account password. |

### ADFS Client Credentials with Certificate

Use Active Directory Federation Services (ADFS) client credentials authenticated with an X.509 certificate. Harness supports RSA private keys in PKCS8 format and X.509 certificates.

| Field           | Description                                                                             |
| --------------- | --------------------------------------------------------------------------------------- |
| **Resource ID** | Harness secret containing the resource identifier of ServiceNow configured in ADFS.     |
| **Client ID**   | Harness secret containing the application (client) ID assigned by AD FS.                |
| **Private Key** | Harness encrypted file containing the RSA private key corresponding to the certificate. |
| **Certificate** | Harness encrypted file containing the X.509 certificate used to sign JWT tokens.        |
| **ADFS URL**    | Base URL of your AD FS server.                                                          |

Permissions granted to this connector in ServiceNow depend on the configuration of the client application group. Go to [AD FS OpenID Connect and OAuth flows](https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/overview/ad-fs-openid-connect-oauth-flows-scenarios) to review the authentication flow.

### OIDC Refresh Token

Use an OpenID Connect (OIDC) persistent refresh token with a `refresh_token` grant type. All refresh tokens must be valid and updated when revoked. Permissions depend on the associated resource owner.

| Field             | Required | Description                                                                                                                                             |
| ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Client ID**     | Yes      | Harness secret containing the application (client) ID assigned by OIDC.                                                                                 |
| **Client Secret** | No       | Harness secret containing the application client secret.                                                                                                |
| **Refresh Token** | Yes      | Harness secret containing the refresh token.                                                                                                            |
| **Token URL**     | Yes      | Explicit token URL. For ServiceNow: `https://<YOUR_DOMAIN>.service-now.com/oauth_token.do`. For Okta: `https://<YOUR_DOMAIN>.okta.com/oauth2/v1/token`. |
| **Scope**         | No       | OAuth scope. Not required when you use ServiceNow as the auth server; Harness fetches it from the ServiceNow URL automatically.                         |

Go to [REST API Auth Scope](https://docs.servicenow.com/bundle/utah-platform-security/page/administer/security/concept/rest-api-auth-scope.html) to configure scope in ServiceNow.

***

## Field reference

The following table describes all connector fields.

| Field              | Required | Description                                                                                           |
| ------------------ | -------- | ----------------------------------------------------------------------------------------------------- |
| **Name**           | Yes      | Display name for the connector.                                                                       |
| **Id**             | Yes      | Unique identifier, auto-generated from the name.                                                      |
| **Endpoint**       | Yes      | Base URL of your ServiceNow instance.                                                                 |
| **Authentication** | Yes      | Auth method: **Username / Password**, **ADFS Client Credentials w/ Cert**, or **OIDC Refresh token**. |
| **Description**    | No       | Free-text description under **Metadata**.                                                             |

***

## Next steps

* Go to [ServiceNow approval step](https://developer.harness.io/harness-platform/3.0/harness-platform-resources/overview/overview-1/approvals/service-now-approval.md) to use this connector in a pipeline approval.
* Go to [Add and reference text secrets](https://developer.harness.io/harness-platform/3.0/harness-platform-resources/secrets/add-use-text-secrets.md) to store credentials securely.
