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:
- ServiceNow Admin Access: You need permission to create service accounts
- ServiceNow Instance URL: Your full instance URL (e.g.,
https://dev12345.service-now.com) - 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:
- Navigate to User Administration → Users
- Click New
- 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
- User ID:
- Set a strong password and save it securely
- Assign roles:
- Read-only access:
itilorcmdb_readrole - Write access (optional, only for CSDM Workbench):
itil_admin+web_service_admin
- Read-only access:
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:
- Log out of ServiceNow
- Log in with your new service account credentials
- Navigate to Configuration → Configuration Items
- Verify you can see CI records
- Log out
Step 3: Configure cmdbx Connection
In cmdbx:
- Navigate to Admin (left sidebar)
- Click ServiceNow Connection
- 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
- Click "Test Connection"
- cmdbx will verify:
- URL is reachable
- Credentials are valid
- Required permissions are present
- Can access CMDB tables
- 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
- Click "Save Configuration"
- Click "Trigger Manual Sync"
- 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:
- In ServiceNow, assign your service account:
itil_adminroleweb_service_adminrole
- In cmdbx Admin → Write Credentials:
- Enter the same username and password
- Click "Test Write Connection"
- 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):
- Navigate to Admin → Environments
- Click "Add Environment"
- Name:
Production,Staging, orDevelopment - Configure separate credentials for each environment
- 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
itilorcmdb_readrole 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
- Sync Configuration Guide - Advanced sync options
- Health Dashboard - View your data
- Dependency Map - Visualize relationships
Need Help?
Contact [email protected] with your instance details (don't include passwords).