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

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hey Thomas,



Try giving the role "import_set_loader" and "import_transformer" and check once.


Please let me know if you are blocked.


I added "import_set_loader" and "import_transformer". I get a 401


Unauthorized. By the way, this is Geneva release.


Hey Thomas,



Just for testing purpose can you trying giving the "itil" role and check the behaviour once


srinivasthelu
Tera Guru

Hi Thomas,



When user wont satisfy ACLS, You would get error something like this. With 403.



{
  "error": {
  "message": "Operation Failed",
  "detail": "ACL Exception Insert Failed due to security constraints"
  },
  "status": "failure"
}



What is the error code   and message that you get?.



Thanks


Srini