Connect ServiceNow

Last Updated: January 6, 2026 Estimated Reading Time: 6 minutes

Overview

This guide shows how to connect your ServiceNow instance to cmdbx. You need ServiceNow admin access to create a service account and to configure the credentials.

Only users with the Admin role in cmdbx can configure ServiceNow connections. If you are a regular user, ask your admin to do this setup.

Prerequisites

Before you begin, make sure that you have these three items:

  1. ServiceNow admin access: You need permission to create service accounts.
  2. ServiceNow instance URL: Your full instance URL (for example, https://dev12345.service-now.com).
  3. cmdbx Admin role: Your organization's cmdbx super-admin assigns this role.

Step 1: Create a ServiceNow Service Account

We recommend a dedicated service account for cmdbx. Do not use your personal account.

In ServiceNow:

  1. Go to User AdministrationUsers.
  2. Click New.
  3. Complete the user details:
    • User ID: cmdbx_service_account (or a name that you prefer)
    • First name: cmdbx
    • Last name: Service Account
    • Email: Use an email address that you monitor.
  4. Set a strong password and save it in a secure location.
  5. Assign the roles:
    • Read-only access: the itil or cmdb_read role
    • Write access (optional, for the CSDM Workbench only): the itil_admin and web_service_admin roles

Start with read-only access. You can add write credentials later if you want to use the CSDM Workbench feature.

Step 2: Test ServiceNow Access

Before you configure cmdbx, make sure that your service account works:

  1. Log out of ServiceNow.
  2. Log in with your new service account credentials.
  3. Go to ConfigurationConfiguration Items.
  4. Make sure that you can see the CI records.
  5. Log out.

Step 3: Configure the cmdbx Connection

In cmdbx:

  1. Go to Admin (left sidebar).
  2. Click ServiceNow Connection.
  3. Complete the connection details.

Instance URL

https://[your-instance].service-now.com

Do not include a trailing slash or a path. Use the base instance URL only.

Read Credentials

  • Username: Your service account username (for example, cmdbx_service_account)
  • Password: The service account password

cmdbx encrypts the credentials with AES-256-CBC before it stores them. Each tenant has a unique encryption key.

Step 4: Test the Connection

  1. Click "Test Connection".
  2. cmdbx makes these four checks:
    • The URL is reachable.
    • The credentials are valid.
    • The necessary permissions are present.
    • The CMDB tables are accessible.
  3. If the test is a success, cmdbx shows: "Connection successful! Found X CIs".

Common Test Failures

| Error | Solution | |-------|----------| | Unable to connect to instance | Make sure that the URL is correct and the instance is accessible. | | Authentication failed | Check the username and password again. | | Insufficient permissions | Give the service account the itil or cmdb_read role. | | Table access denied | Make sure that the ACLs give access to the cmdb_ci tables. |

Step 5: Configure the Sync Settings

After a successful connection, configure the sync.

Select the CI Classes

Choose which CI classes to sync:

  • Servers: cmdb_ci_server, cmdb_ci_linux_server, cmdb_ci_win_server
  • Databases: cmdb_ci_database
  • Applications: cmdb_ci_appl, cmdb_ci_business_app
  • Network devices: cmdb_ci_netgear, cmdb_ci_ip_router
  • Services: cmdb_ci_service, cmdb_ci_service_discovered

Start with the core classes (Servers, Applications, and Services). You can add more classes later.

Set the Sync Schedule

Choose the sync frequency:

  • Manual only: You start each sync manually.
  • Daily: The sync runs at 2 AM UTC (recommended).
  • Twice daily: The sync runs at 2 AM and 2 PM UTC.
  • Hourly: For real-time scenarios (this affects performance).

Environment Mapping

Map the ServiceNow data to the cmdbx environments:

  • Production: CIs with u_environment = "production"
  • Staging: CIs with u_environment = "staging"
  • Development: CIs with u_environment = "development"

Step 6: Run the Initial Sync

  1. Click "Save Configuration".
  2. Click "Trigger Manual Sync".
  3. Watch the sync progress in the Sync Status panel.

Sync Duration

| CMDB Size | Typical Duration | |-----------|------------------| | Fewer than 1,000 CIs | 5-10 minutes | | 1,000 - 10,000 CIs | 10-20 minutes | | 10,000 - 50,000 CIs | 20-40 minutes | | More than 50,000 CIs | 40-90 minutes |

The first sync is always a full sync. Each later sync is incremental. It syncs the changed CIs only.

Optional: Configure Write Access (CSDM Workbench)

To use the CSDM Workbench to create services in ServiceNow:

  1. In ServiceNow, give your service account these two roles:
    • itil_admin
    • web_service_admin
  2. In cmdbx, go to AdminWrite Credentials:
    • Enter the same username and password.
    • Click "Test Write Connection".
  3. If the test is a success, cmdbx shows: "Write access verified. Can create CIs and relationships."

cmdbx stores write credentials separately with stronger encryption. It logs all write operations in the audit trail.

Multi-Environment Setup

To connect more than one ServiceNow instance (production and non-production):

  1. Go to AdminEnvironments.
  2. Click "Add Environment".
  3. Enter the name: Production, Staging, or Development.
  4. Configure separate credentials for each environment.
  5. Use the dropdown in the top navigation to switch between environments.

Multi-environment support depends on your deployment and commercial model. This includes Enterprise and MSP engagements.

Security Best Practices

  • Use a dedicated service account, not your personal account.
  • Use strong, unique passwords.
  • Give the minimum necessary permissions.
  • Change the credentials every 90 days.
  • Watch the audit log for suspicious activity.
  • Use read-only access unless you need write access.

Troubleshooting

"Connection timeout"

  • Cause: The ServiceNow instance is unreachable, or a firewall blocks the connection.
  • Solution: Check the URL. Check the firewall rules. Make sure that the instance is active.

"Invalid credentials"

  • Cause: The username or password is incorrect.
  • Solution: Check the credentials. Reset the service account password if necessary.

"Missing required role"

  • Cause: The service account does not have the necessary permissions.
  • Solution: Give the service account the itil or cmdb_read role in ServiceNow.

"Sync taking too long"

  • Cause: The CMDB is large, or the network has latency.
  • Solution: Sync fewer CI classes. Use an incremental sync.

"No CIs found after sync"

  • Cause: The service account cannot access the CMDB tables, or an ACL blocks access.
  • Solution: Check the ACLs in ServiceNow. Make sure that the table access is correct.

Next Steps


Need Help?

Contact [email protected] with your instance details. Do not include passwords.