Unable to fetch proper roles of table
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 11:10 PM - edited 10-16-2023 11:15 PM
Hello Everyone,
Currently, I am fetching table read roles with "sys_security_acl_role" and i pass the argument "operation" as read and "name" as table name
acl_url = f"{instance_url}/api/now/table/sys_security_acl_role"
params = {"sys_security_acl.operation": "read", "sys_security_acl.name": incident}
But in the response i got multiple roles as below:
ml_report_user
ml_admin
itil
sn_incident_read
ml_admin
itil
sn_incident_read
So, here sn_incident_read is correct as the user with sn_incident_read has access to read the table but why i am getting ml_report_user, ml_admin, and itil where ml_report_user, ml_admin does not have read access to the table.
Does anyone know how can i fetch only roles that have read access to the table only?
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 11:44 PM
Yes @Tai Vu I got your point. But I am writing a script in Python to fetch users who have read access to a specific table. I fetch the roles of users and compare the above roles. But when I set sys_security_acl.operation to read I got ml_report_user and ml_admin. which breaks my script as the user only has ml_report_user or ml_admin role and does not read the incident table. Do you have any other way to find this,
