How to fetch access control roles of tables

parth2922
Tera Contributor

Hey Everyone, I want to fetch access control roles of tables using rest API. Does anyone know how can i get the roles of tables?

 

I only want to know the minimum read role of the table. I.E. incident have sn_incident_read role.

 

Thanks.

 

7 REPLIES 7

@Hemanth M1 But it will fetch all the users who have access to the whole table and users who have access to only one or two records. But actually, I want only users who have access to the whole table. And if we forget the part of users can we fetch only roles that have read access to the table like "sn_incident_read"?

 

Can we add one more condition where we can discard the access control which have condition or script added.

 

Also, I am trying to convert the above code in Python so do you have any idea how I convert addEncodedQuery 

parth2922
Tera Contributor

Also when i am trying to hit rest API to get a response of sys_security_acl_role I get the below response

{
            "transaction_id""",
            "sys_mod_count""0",
            "sys_updated_on""2020-01-17 10:32:13",
            "sys_tags""",
            "sys_class_name""sys_security_acl_role",
            "sys_id""e0cd200109ffb8467a7cb0b11",
            "sys_package": {
                "value""4cfc320f8dc279c8040f"
            },
            "sys_security_acl""",
            "sys_update_name""sys_security_acl_role_e0cbc89787d200109ffbcb0b11",
            "sys_updated_by""admin",
            "sys_user_role": {
                "value""b05940a0aa70090a4893f6ff35d"
            },
            "sys_created_on""2020-01-17 10:32:13",
            "sys_name"".nobody",
            "sys_scope": {
                "link""https://domain.service-now.com/api/now/table/sys_scope/global",
                "value""global"
            },
            "sys_created_by""admin",
            "sys_policy"""
        }
in which I am unable to find Names, roles etc.