The following error occurs when attempting to create or reauthorize a ServiceNow connection in Workflows:
401 Unauthorized
- Workflows
- ServiceNow connector
For the 401 Unauthorized Error when creating the connection for Service Now:
The ServiceNow connector uses Basic authentication, which requires a username, password, and instance name to create a connection. When attempting to create or reauthorize a connection and failing with the 401 Unauthorized error, it is commonly due to invalid credentials (an invalid username or password) or the account not having the ServiceNow permissions required by the connector.
For the Failed to Load Error on Action cards - This is caused by permissions as well.
If the connection does not have the permissions required to retrieve the type of values the dynamic drop-down is attempting to acquire, it will nearly immediately say Failed to Load. Please check with the ServiceNow team and ensure that the Service Account you used has the personalize_dictionary and incident_manager permissions in ServiceNow.
Troubleshooting Steps:
- Generate a HAR trace of the failure attempting to authorize the connection. See Generate HAR Files for detailed steps on how to generate a HAR file.
- In the HAR trace, find the POST request to the /test endpoint and get the Response:
- If the response body is 401 Unauthorized, the error is most likely due to invalid credentials:
{
"output": {
"serviceResponse": {
"statusCode": 401,
"body": "401 Unauthorized"
},
"working": false
}
}
- If the response body is "{ "result" : [] }", the error is most likely due to the account not having the permissions required by the ServiceNow connector:
{
"output": {
"working": false,
"serviceResponse": {
"statusCode": 401,
"body": {
"result": []
}
}
}
}
This error can occur when the account does not have the incident_manager role in ServiceNow. Verify the account has all of the permissions required by the connector as documented in the ServiceNow Authorization documentation.
