Is ACL ignored for GlideQuery?

Takaaki Sawai
ServiceNow Employee
ServiceNow Employee

Hi experts, 

 

I executed the query using the GlideQuery API and the query succeeded despite the lack of Read permission. The GlideRecordSecure API does not succeed in querying when there is no Read permission. I understand that the query with GlideRecordSecure check ACLs automatically.

 

How can I ensure that ACLs are applied when I execute a query using the GlideQuery?
Should I include a logic that check ACL or Role before executing a query with GlideQuery?

1 ACCEPTED SOLUTION

At bottom of GlideQuery documentation is method

withAcls()

Have you tried it?

GlideQuery | ServiceNow Developers

View solution in original post

3 REPLIES 3

Tony Chatfield1
Kilo Patron

Hi, I think GlideRecordSecure might be the solution you need as it enforces ACL's

GlideRecord | ServiceNow Developers

Glide Server APIs (servicenow.com)

 

Hi Giga

 

Thank you for your response.
I would like to use GlideQuery because GlideRecord creates a record that includes blank values if the new recored data have invalid field data.
Is there the best way to check ACL before inserting or updating a record with GlideQuery?

At bottom of GlideQuery documentation is method

withAcls()

Have you tried it?

GlideQuery | ServiceNow Developers