Configuring a ServiceNow Webhook Connection
Once you have your foreign system established in the Integrations Console, you are ready to also enable Webhook configuration.
Webhook configuration requires an enabled API setting under Admin > Configuration > Advanced. Set the API Settings > API Enabled switch to Yes.
Configuring an API Credential
- Go to the Admin > Configuration > Credentials.
-
Select Create and create a webhook API Credential as a standard user.
-
Create an API Client User. For details, see Assigning Roles to a User.
-
Copy the Client Id and Secret for the credential.
-
- For Account Name enter the Client Id.
- For Password enter the Secret.
- Select Save Changes.
Configuring the Webhook
-
Go to your ServiceNow Foreign Systems configuration (Admin > Configuration > Foreign Systems and select the ServiceNow foreign system from the list).
-
Select Use Webhook.
-
From the Credential dropdown, select the webhook credential you created above.
-
For Privilege Manager Post Url save the API Endpoint, (for example
https://yourprivilegemanagerinstance.com/Tms/services/api/v1/approval/approve
). -
Select Save Changes.
Once the foreign system is saved, a new webhook is created in the background and a server task is triggered to register the webhook with the ServiceNow App.
Verifying the Webhook Creation
-
Go to the Admin > Configuration.
-
Select the Messaging tab.
-
Under the Webhook Configuration, verify your webhook is listed.
-
From the list of configured webhooks, select the one you just created.
The default webhook event for ServiceNow foreign systems integrations is Approval Request Event.
Performing registration with ServiceNow App
The process takes place automatically when the ServiceNow instance is saved with the Use Webhook checkbox ticked. The registration returns an Instance Id (returned as sys id on a POST) that must be sent with each request.
The registration request body is visible in the ServiceNow instance on the Integration Configuration tab.
The supported Activity Type must be registered before a request of a specific request type can be sent. Activity registration will return ActivityType Id (returned as sys id on a POST).
The Activity type supports two valid responses:
- Approve
- Deny