Connecting to ServiceNow
In ServiceNow
Under System Security | Users, set up a dedicated integration user as follows. It is important to set:
- User ID: Can be anything, but we suggest "magicsuite" - this will be needed later
- Time zone to "GMT" (UTC)
- Email: connection@magicsuite.net
- Date format: yyyy-MM-dd
- Active: checked
- Identity type: machine
- Internal integration user: checked
- A password - this will be needed later
Assign roles
The user needs at least one of these roles:
| Role | Access Level |
|---|---|
| itil | Read access to most CMDB tables |
| cmdb_read | Read-only access to CMDB |
| cmdb_admin | Full CMDB access (read/write/delete - needed for ConnectMagic) |
| rest_api_explorer | Allows testing in API Explorer |
To assign roles:
- Navigate to User Administration > Users
- Find the user
- Scroll to the Roles related list
- Click Edit and add the appropriate role(s)
Check Table-Level ACLs
ServiceNow uses Access Control Lists (ACLs) to control table access:
- Navigate to System Security > Access Control (ACL)
- Search for
cmdb_ciin the Name field - Verify the roles assigned match what your user has
- For read access, ensure there's a
cmdb_ci.readACL that includes one of the user's roles
In the Magic Suite admin app
To set up Magic Suite apps to connect to your ServiceNow system:
- From the Admin menu, click Connections
- Click the Create button
- From the Type drop-down, select a Connection type of ServiceNow
- Enter a name - we recommend that you use "Default" for the name of the first connection of each type, and optionally, a description
- In the URL field, enter your system URL
- In the User name field, enter your User Id from above
- In the Password field, enter your password - this may be the password OR the API key
- If you want macros to validate the count of items returned (which may not be advisable for long-running queries where the count is different at start and end), in the Configuration field, use JSON in the form:
{ "ValidateCountItemsReturned" : true }
Note that you can also override this in each ServiceNow macro - see the help for details - When you are NOT using skip and take parameters in your macros, and for example want to list or count all items based on a query, ReportMagic does some automatic paging based on the "sys_created_on" date / time field. HOWEVER, if the table in your query does NOT contain that field, you may choose another date / time based field. To do this, in the Configuration field, use JSON in the form:
{ "PagingFieldName" : "date/time field here" }
Note that you can also override this in in each ServiceNow macro - see the help for details.
When both of the above items are used, they both go inside valid JSON e.g. { "ValidateCountItemsReturned" : true, "PagingFieldName" : "inc_sys_created_on" } - Click Save