Insight - Setting up ServiceNow Import configuration results with error "Could not connect to service"
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
After setting up ServiceNow Insight Import type, "Could not connect to service" error appears when testing the configuration.
The configuration cannot be saved and used to perform the import.
Environment
- Insight 8.x standalone
- Jira Service Management Data Center with embedded Insight
- Insight - ServiceNow integration plugin installed
Diagnosis
- Analyzing collected HAR file from when the configuration was tested, reveals "400 Bad Request" response for URL
<baseURL>/rest/insight/1.0/import/module/test/insight-servicenow-import?objectSchemaId=xx
In some cases, the following error appears in the log:
2021-05-10 20:55:46,284+0200 http-nio-8080-exec-86 url: /rest/insight/1.0/import/module/test/insight-servicenow-import; user: admin WARN admin 1255x132674x1 6btcg3 xx.xxx.xxx.xxx,yy.yyy.yyy.yyy,127.0.0.1 /rest/insight/1.0/import/module/test/insight-servicenow-import [i.riada.rest.RestClient] Response Error 400 - Bad Request for https://<URL>/api/now/table/cmdb_ci_server/now/table/v_user_session?sysparm_display_value=true&sysparm_limit=1
Cause
The endpoint <URL>/api/now/table/v_user_session?sysparm_display_value=true&sysparm_limit=1
requires specific access privileges for the integration user to access it.
Solution
As an integration user, please use the admin user who can access the given endpoint.
For more information and technical details, we would recommend you to raise a support request with the ServiceNow team.