Getting insufficient rights to query records via REST API using admin credential
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2018 01:48 PM
Using REST need to extract to pieces of data.
1) Count of VMware Templates in use and I am able to extract this data by the following GET
{{server}}{{path}}/stats/cmdb_ci_vmware_template?sysparm_count=true
2) Count of VMware Templates that have credentials and I am unable to extract this data using GET
{{server}}{{path}}/stats/cmdb_ci_vmware_template?sysparm_query={credential}=true&sysparm_count=true
Get the JSON message using admin credentials
{
"error": {
"detail": "No permission to read column(s): [{credential}]",
"message": "Insufficient rights to query records"
},
"status": "failure"
}
Either my query is not right or some parts of CMDB are not accessible via REST, even as admin. I think the issue is former but need confirmation and help. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2018 09:16 PM
Hi Darien,
Can you check any query business rule on that table?
even with admin ACLs should not be an issue.
I assume you are consuming ServiceNow table from some 3rd party app
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2018 09:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2018 08:31 PM
Thanks for the reply.
While exploring ACL and digging deeper into tables and columns, found ServiceNow REST API Explorer, digging deeper into the syntax for sysparm_query, was able to construct new GET URL that returned the correct value and with no permission issues.
GET {{server}}{{path}}/stats/cmdb_ci_os_template?sysparm_count=true
GET {{server}}{{path}}/stats/cmdb_ci_os_template?sysparm_query=name%3E0%5Ecredentials%3E0&sysparm_count=true
Issue resolved