Rest API call fails with error {"error":{"message":"User Not Authorized","detail":"7831 records constrained due to ACL restrictions"},"status":"failure"}".

Matthew Robinso
Kilo Explorer

I am pulling blocks of records from the projects table using the Rest API using this URL (<<mycompanyname>> is the actual name)  

https://<<servicenowinstancename>>.service-now.com/api/now/v2/table/pm_project?sysparm_display_value=true&sysparm_offset=7800&sysparm_limit=100

This succeeds 77 times until the last call to this URL to get the last 31 records:

https://<<servicenowinstancename>>.service-now.com/api/now/v2/table/pm_project?sysparm_display_value=true&sysparm_offset=7800&sysparm_limit=31

which fails with the following error:

The HTTP request was forbidden with client authentication scheme 'Basic'.
{"error":{"message":"User Not Authorized","detail":"7831 records constrained due to ACL restrictions"},"status":"failure"}".

Any ideas?  Sometimes this works, but mostly it fails.

Thanks

4 REPLIES 4

Mike Patel
Tera Sage

Basically the account you are using doesn't have access to view all projects. There is a acl blocking. If you try to login with same username and password and go to pm_project table, you will also see same ACL error at the bottom of list view.

hi mike am having same issue but when i checked i dont find any pm_project table can you help me with this

 

{
"error": {
"detail": "14534 records constrained due to ACL restrictions",
"message": "User Not Authorized"
},
"status": "failure"
}

Rahul Priyadars
Giga Sage
Giga Sage

To make trouble shooting easier- > Login in GUI with user Name that is used for REST API Call (hope interactive session is allowed for this troubleshooting)

After loggin using the user just try to do same which you are using in REST API .

As per error - It seems that user do not have permission to access the table or ACL is blocking it.

Regards

RP

Ashutosh Munot1
Kilo Patron
Kilo Patron

HI,

When you create a REST API check if you have forced any ACL on that. Also check all read ACL on this Project table.

Thanks,
Ashutosh Munot