<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
Error "401 Unauthorized" when Attempting to Create or Reauthorise a ServiceNow Connection in Workflows or "Failed to Load" Error on Action Card
Workflows
Okta Classic Engine
Okta Identity Engine
Overview

The following error occurs when attempting to create or reauthorize a ServiceNow connection in Workflows:

 

401 Unauthorized

ServiceNow401 
 

"Failed to Load" Error on Action card: 
 
Search users
Applies To
  • Workflows
  • ServiceNow connector
Cause

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.

Solution

Troubleshooting Steps:

  1. 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.
  2. In the HAR trace, find the POST request to the /test endpoint and get the Response:

TestEndpoint

 

  1. 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
    }
}

 
To verify the credentials are valid, use Postman or a similar tool to call one of the ServiceNow REST APIs outside of workflows to confirm successful authentication.
 
  1. 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.
 
For the Failed to Load Error on Action cards: To troubleshoot this, please review and adjust the permissions for the ServiceNow account used in the service connection. Ensure that the Service Now account has all necessary permissions to access the tables and fields required by the specific cards being used (such as 'Create Request', 'Create Incident', and 'Search Groups').

Related References

Loading
Error "401 Unauthorized" when Attempting to Create or Reauthorise a ServiceNow Connection in Workflows or "Failed to Load" Error on Action Card