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:
- ServiceNow admin access: You need permission to create service accounts.
- ServiceNow instance URL: Your full instance URL (for example,
https://dev12345.service-now.com). - 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:
- Go to User Administration → Users.
- Click New.
- 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.
- User ID:
- Set a strong password and save it in a secure location.
- Assign the roles:
- Read-only access: the
itilorcmdb_readrole - Write access (optional, for the CSDM Workbench only): the
itil_adminandweb_service_adminroles
- Read-only access: the
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:
- Log out of ServiceNow.
- Log in with your new service account credentials.
- Go to Configuration → Configuration Items.
- Make sure that you can see the CI records.
- Log out.
Step 3: Configure the cmdbx Connection
In cmdbx:
- Go to Admin (left sidebar).
- Click ServiceNow Connection.
- 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
- Click "Test Connection".
- cmdbx makes these four checks:
- The URL is reachable.
- The credentials are valid.
- The necessary permissions are present.
- The CMDB tables are accessible.
- 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
- Click "Save Configuration".
- Click "Trigger Manual Sync".
- 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:
- In ServiceNow, give your service account these two roles:
itil_adminweb_service_admin
- In cmdbx, go to Admin → Write Credentials:
- Enter the same username and password.
- Click "Test Write Connection".
- 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):
- Go to Admin → Environments.
- Click "Add Environment".
- Enter the name:
Production,Staging, orDevelopment. - Configure separate credentials for each environment.
- 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
itilorcmdb_readrole 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
- Sync Configuration Guide - Advanced sync options
- Health Dashboard - View your data
- Dependency Map - Visualize relationships
Need Help?
Contact [email protected] with your instance details. Do not include passwords.