REST API User Not Authenticated

tpoeckes
Giga Guru

I'm trying to create records in an import set via REST API.   I have the REST API using the Import Set API name.   https://instance.service-now.com/api/now/import/u_test.   I have created the security rule for "create" and added the rest service role to this table.   I have created a new user called restapiuser and checked the "Web access service only" and added the "rest service" role.   I'm using Postman to send REST API request.   When I use admin it works but when I use restapiuser I get not authenticated.   I seems like it doesn't have access to the table.     Is there any other ACLs that need to be set so restapiuser to write records to the u_test import table?

14 REPLIES 14

Hi Thomas,



I am facing the same issue. Could you please help me to resolve this.



Thanks!



'Raj


  • You will need to create a local user account in service now user table and pass it from the rest API explorer

bluesky123
Kilo Explorer

In my case, I am trying to write a Python program to get some incident records from ServiceNow.   I followed the sample code here: Table API Python examples (under GET example), and I keep getting this error.   When I tried it in Postman, everything works fine.   I have a local account in ServiceNow.   Please let me know what I have done wrong.   Thanks.


alao
Kilo Contributor

I'm facing the same problem!!!!   I have tried everything and I know I'm setting the authorization headers!!!



HTTP/1.1 401 Unauthorized


{"error":{"detail":"Required to provide Auth information","message":"User Not Authenticated"},"status":"failure"}


Hello,



We were facing this issue as well. Are you using SSO? If so, set a password on the user profile that is being used for the API calls, this resolved the problem for us. Here are the roles assigned to the user in case you were wondering:



apiUserRoles.jpg