ServiceNow Table API returns 401 "User is not authenticated" with Basic Authentication

alexkrishna
Giga Contributor

Hi everyone,
I am currently troubleshooting an authentication issue when trying to create a ServiceNow CSM Case through the REST API.

Environment

  • ServiceNow module: Customer Service Management (CSM)
  • Case table: sn_customerservice_case
  • Voice/telephony integration: ServiceNow Voice / CCI with Amazon Connect
  • ServiceNow instance: <instance>.service-now.com
  • Integration method: AWS Lambda calling the ServiceNow REST API

Issue

We are trying to create a CSM Case directly through the Table API, independently of the Interaction/CCI flow.

Endpoint:

POST https://<instance>.service-now.com/api/now/table/sn_customerservice_case

We tested using Basic Authentication:

Authorization: Basic <base64(username:password)>

However, the request consistently returns:

{
  "statusCode": 401,
  "body": {
    "error": {
      "message": "User is not authenticated",
      "detail": "Required to provide Auth information"
    },
    "status": "failure"
  }
}

We tested the same request independently using curl, outside of AWS Lambda, and received the exact same 401 response.

Because the failure occurs identically outside Lambda, we believe the issue is likely related to the ServiceNow authentication/security configuration rather than the Lambda implementation itself.

Any guidance on the specific ServiceNow configuration to check would be greatly appreciated.

Thanks!

 

2 ACCEPTED SOLUTIONS

yashkamde
Tera Sage

Hello @alexkrishna ,

 

plz make ensure that you have properly configured basic auth profile in sys_auth_profile_basic table :

yashkamde_0-1789980626264.png

 

yashkamde_1-1789980626273.png

 

 

I have tested in my instance and working proper with basic auth :

yashkamde_2-1789980626244.png

 

If my response helped mark as helpful and accept the solution.

View solution in original post

2 REPLIES 2

yashkamde
Tera Sage

Hello @alexkrishna ,

 

plz make ensure that you have properly configured basic auth profile in sys_auth_profile_basic table :

yashkamde_0-1789980626264.png

 

yashkamde_1-1789980626273.png

 

 

I have tested in my instance and working proper with basic auth :

yashkamde_2-1789980626244.png

 

If my response helped mark as helpful and accept the solution.