Before you start
Part 1: Create an integration user in ServiceNow
1
Open Users
Sign in to ServiceNow and go to User Administration > Users, then click New.
2
Name the user
Enter a User ID, for example
threataware.incident.creation.3
Allow API access only
Tick Web service access only, so the account can use the API but can’t sign in to the ServiceNow interface. Click Save.
Part 2: Assign roles
1
Edit the user's roles
Open the saved user record, go to the Roles tab and click Edit.
2
Add a role that can create incidents
Add the
itil role, or your organisation’s least-privilege equivalent that can create incident records. If your instance enforces REST API access policies, also add snc_platform_rest_api_access. Click Save.Part 3: Set the password
1
Generate a password
On the user record, click Set Password and generate a strong password.
2
Untick Password needs reset
Make sure Password needs reset is unticked. If it’s left ticked, ServiceNow refuses the API sign-in and ThreatAware gets
401 Unauthorized.3
Store it safely
Copy the password into your password vault. You need it in part 5.
Part 4: Create the flow in ThreatAware
1
Track the devices
In Devices, build the view of devices that should raise tickets and track it, usually as Continuous.
2
Create a flow
In Action Center, click New flow, name it, and add an HTTP request step connected to Start of action.
3
Set the URL
Set the method to POST and the URL to:Replace
<your-instance> with the name at the start of your ServiceNow address. Only the instance name comes from the address bar; add the /api/now/table/incident path exactly as shown.Part 5: Add the request headers
Join the username and password with a colon and base64-encode the result. Do this on your own machine rather than with an online encoder, so the password never leaves it:Spell the key Authorization, with a “z”. “Authorisation” isn’t recognised. Leave exactly one space between
Basic and the encoded string. ThreatAware saves header values as masked secrets; if you edit the URL later, you’ll need to enter them again.Part 6: Write the ticket body
In the HTTP request step, click + Add and choose Body. Map ThreatAware data to your incident fields so each ticket carries the affected devices, the issue and the risk. Use Insert merge field in the body to add device details. For example:{{count}} is the number of devices in the run. See Device details in a step for the other merge fields.
Part 7: Set triggers, test and publish
1
Point it at your tracked view
Click Triggers and choose your tracked view under Trigger from. Set a Maximum device count as an emergency stop, and choose Per device (one ticket per device) or All at once (one ticket for the group) under Run mode. See Triggers.
2
Test
Click Debug on Start of action to try the flow, then in ServiceNow open Incident > All and check a new incident has been created with every field filled in as expected.
3
Publish
Click Publish. From now on, devices entering the tracked view raise tickets.
Two-way sync. When the ticket is closed in ServiceNow, the device is resolved in ThreatAware.
Troubleshooting
Still on ThreatAware 3.2?
Still on ThreatAware 3.2?
On ThreatAware 3.2, set this up as an Action on a saved view instead of a flow. Open the saved view, open its action, select the continuous trigger and choose Create Ticket. The URL, headers and body are the same as above. Click Create and Run to save the action and trigger it straight away.