unable to register webhook while performing Servicenow-ADO integration

shabbir5
Tera Guru

Hi All, 

 

i installed required plugins for servicenow - ADO for agile development plugin 

 

created credential alias , credentials ( with PAT token provided by ADO team ) ma and connection record

 

then created Azure devops instance with URL given by ADO

 

clicked on connection , got  connection successful message

 

then i clicked on discover project , and i got one project 2 from ADO

 

--> i opened the discovered project , and clicked on "register webhooks" , the i got below error 

"Cannot establish a connection. Please check the system logs for details."

 

How to fix this issue ?

 

@Ahmmed Ali 

 

Thank you,

Shabbir Shaik

2 REPLIES 2

Josh Gold
Tera Expert

Hi @shabbir5 ,

Let's see if we can figure this out. 

Check the following issues to see if any of them are responsible for the error message you're seeing: 


1. ServiceNow Logs:
 

As the error message suggests, start with your ServiceNow system logs for detailed error messages. Look up any errors related to the webhook registration process, network communication, or payload parsing.

 

2. Webhook Payload/Configuration:

If that doesn't yield any answers, check the webhook configuration in ADO to ensure it's set to trigger for the relevant events (e.g., work item updates, creation, deletion).

 

Payload Format: The webhook payload sent to ServiceNow should be in a format (e.g., JSON) that the ServiceNow integration can understand. A formatting error here is likely the culprit.

 

If possible, capture a sample webhook payload from Azure DevOps and compare it to the expected format in the ServiceNow documentation. Look for any discrepancies or errors.

 

3. Webhook Registration Permissions:

Azure DevOps: Make sure that the Personal Access Token (PAT) you used to create the credentials in ServiceNow has the appropriate permissions to register webhooks in your ADO project. The PAT typically needs "Manage" or "Edit" permissions for the "Service Hooks" scope.

ServiceNow: Does your ServiceNow account have the necessary roles and permissions to perform webhook registration actions?

4. Firewall/Proxy: If either instance in ServiceNow or Azure DevOps is behind a firewall or proxy, make sure to include an exception that allows them to connect..

 

Test if you can reach the Azure DevOps instance URL from the ServiceNow instance using tools like ping or curl. 

 

5. Other ideas:

If none of the above is helpful, you could check to make sure you're not running an outdated version of anything (IntegrationHub, Agile Development 2.0, Azure DevOps Integration for Agile Development)

 

You could also check to make sure your ADO project doesn't include any restrictions or security settings that might block incoming webhook requests. For example, make sure that Third Party Access via OAuth is turned on.

ADO-Policy-2-600x825

Hope that helps!

Ryan Bader
Tera Contributor

I ran into a similar issue and go an error that said:

Instance: SN ADO SI integration Project SI, Action : Register Webhooks, Message : Cannot establish connection. Error Access Denied: 980d4810-45c6-6d20-8a01-1d917927ccb5 needs the following permission(s) on the resource PublisherSecurity/69fe2265-92a6-484c-8711-2aa10257a1bd to perform this action: Edit Subscription

 

the solution is to log into ServiceNow with the account you are wanting to have sync information back and forth (service account), using the login.do URL. then get your OAuth token, you will be prompted to login to AD or SSO with your service account. after that you will be able to register your webhook with the same logged in user.