Connecting ServiceNow

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

Overview

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

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

Prerequisites

Before you begin, ensure you have:

  1. ServiceNow Admin Access: You need permission to create service accounts
  2. ServiceNow Instance URL: Your full instance URL (e.g., https://dev12345.service-now.com)
  3. cmdbx Admin Role: Assigned by your organization's cmdbx super-admin

Step 1: Create a ServiceNow Service Account

We recommend creating a dedicated service account for cmdbx (do not use your personal account).

In ServiceNow:

  1. Navigate to User AdministrationUsers
  2. Click New
  3. Fill in the user details:
    • User ID: cmdbx_service_account (or your preferred name)
    • First name: cmdbx
    • Last name: Service Account
    • Email: Use a monitored email address
  4. Set a strong password and save it securely
  5. Assign roles:
    • Read-only access: itil or cmdb_read role
    • Write access (optional, only for CSDM Workbench): itil_admin + web_service_admin

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 configuring cmdbx, verify your service account works:

  1. Log out of ServiceNow
  2. Log in with your new service account credentials
  3. Navigate to ConfigurationConfiguration Items
  4. Verify you can see CI records
  5. Log out

Step 3: Configure cmdbx Connection

In cmdbx:

  1. Navigate to Admin (left sidebar)
  2. Click ServiceNow Connection
  3. Fill in the connection details:

Instance URL

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

Do not include trailing slashes or paths. Just the base instance URL.

Read Credentials

  • Username: Your service account username (e.g., cmdbx_service_account)
  • Password: The service account password

Credentials are encrypted with AES-256-CBC before being stored. Each tenant has a unique encryption key.

Step 4: Test Connection

  1. Click "Test Connection"
  2. cmdbx will verify:
    • URL is reachable
    • Credentials are valid
    • Required permissions are present
    • Can access CMDB tables
  3. If successful, you'll see: "Connection successful! Found X CIs"

Common Test Failures

| Error | Solution | |-------|----------| | Unable to connect to instance | Verify URL is correct and instance is accessible | | Authentication failed | Double-check username and password | | Insufficient permissions | Service account needs itil or cmdb_read role | | Table access denied | Verify ACLs allow access to cmdb_ci tables |

Step 5: Configure Sync Settings

After successful connection:

Select 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 core classes (Servers, Applications, Services). You can add more classes later.

Set Sync Schedule

Choose sync frequency:

  • Manual only: You trigger sync manually
  • Daily: Runs at 2 AM UTC (recommended)
  • Twice daily: Runs at 2 AM and 2 PM UTC
  • Hourly: For real-time scenarios (performance impact)

Environment Mapping

Map ServiceNow data to cmdbx environments:

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

Step 6: Run Initial Sync

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

Sync Duration

| CMDB Size | Typical Duration | |-----------|------------------| | < 1,000 CIs | 5-10 minutes | | 1,000 - 10,000 CIs | 10-20 minutes | | 10,000 - 50,000 CIs | 20-40 minutes | | 50,000+ CIs | 40-90 minutes |

The first sync is always a full sync. Subsequent syncs are incremental (only changed CIs).

Optional: Configure Write Access (CSDM Workbench)

If you want to use the CSDM Workbench to create services in ServiceNow:

  1. In ServiceNow, assign your service account:
    • itil_admin role
    • web_service_admin role
  2. In cmdbx Admin → Write Credentials:
    • Enter the same username and password
    • Click "Test Write Connection"
  3. If successful: "Write access verified. Can create CIs and relationships."

Write credentials are stored separately with enhanced encryption. All write operations are logged in the audit trail.

Multi-Environment Setup

To connect multiple ServiceNow instances (prod + non-prod):

  1. Navigate to AdminEnvironments
  2. Click "Add Environment"
  3. Name: Production, Staging, or Development
  4. Configure separate credentials for each environment
  5. Switch between environments using the dropdown in the top navigation

Multi-environment support can be scoped based on your deployment and commercial model, including Enterprise and MSP engagements.

Security Best Practices

  • Use a dedicated service account (not your personal account)
  • Use strong, unique passwords
  • Grant minimum required permissions
  • Rotate credentials every 90 days
  • Monitor the audit log for suspicious activity
  • Use read-only access unless write is explicitly needed

Troubleshooting

"Connection timeout"

  • Cause: ServiceNow instance is unreachable or firewall blocking
  • Solution: Verify URL, check firewall rules, ensure instance is active

"Invalid credentials"

  • Cause: Username or password incorrect
  • Solution: Verify credentials, reset service account password if needed

"Missing required role"

  • Cause: Service account lacks necessary permissions
  • Solution: Assign itil or cmdb_read role in ServiceNow

"Sync taking too long"

  • Cause: Large CMDB or network latency
  • Solution: Reduce CI classes being synced, use incremental sync

"No CIs found after sync"

  • Cause: Service account can't access CMDB tables or ACL restrictions
  • Solution: Check ACLs in ServiceNow, verify table access permissions

Next Steps


Need Help?

Contact [email protected] with your instance details (don't include passwords).