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:

  1. Navigate to User Administration > Users
  2. Find the user
  3. Scroll to the Roles related list
  4. Click Edit and add the appropriate role(s)

Check Table-Level ACLs

ServiceNow uses Access Control Lists (ACLs) to control table access:

  1. Navigate to System Security > Access Control (ACL)
  2. Search for cmdb_ci in the Name field
  3. Verify the roles assigned match what your user has
  4. For read access, ensure there's a cmdb_ci.read ACL 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:

  1. From the Admin menu, click Connections
  2. Click the Create button
  3. From the Type drop-down, select a Connection type of ServiceNow
  4. Enter a name - we recommend that you use "Default" for the name of the first connection of each type, and optionally, a description
  5. In the URL field, enter your system URL
  6. In the User name field, enter your User Id from above
  7. In the Password field, enter your password - this may be the password OR the API key
  8. 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
  9. 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" }
  10. Click Save
An unhandled error has occurred. Reload 🗙