Get the list of ACLs created in the system along with the role mapping

khushnan
Kilo Contributor

For my application , I want to get the list of ACLs created in my system , along with the role mapping.

How can I get this information? Is there any API available to fetch the list of ACLs ?

Thanks in advance

1 ACCEPTED SOLUTION

it should be because you have given security_admin role already. i am not sure why this table is not accessible in the REST API Explorer. but you can try with "security_acl_detail" . it will also give you the same result.


by the way check with thread below.


I'm trying to create an access role record using serivcenow REST API. The response code is 201 but t...



just try with soap web services . pass the below wsdl url in end point.



https://<your instance>.service-now.com/sys_security_acl.do?wsdl



by using get or getRecords check if you are able to get the records or not.



From the left navigation pane, select System Definition > Tables and Columns. Click tables


Name has all the tables/views. You can check with schema map also there.


View solution in original post

14 REPLIES 14

Harshvardhan,



I am unable to find table name "sys_security_acl" tablename in REST API Explorer


What could be the reason? I elevated my role to security admin too?


it should be because you have given security_admin role already. i am not sure why this table is not accessible in the REST API Explorer. but you can try with "security_acl_detail" . it will also give you the same result.


by the way check with thread below.


I'm trying to create an access role record using serivcenow REST API. The response code is 201 but t...



just try with soap web services . pass the below wsdl url in end point.



https://<your instance>.service-now.com/sys_security_acl.do?wsdl



by using get or getRecords check if you are able to get the records or not.



From the left navigation pane, select System Definition > Tables and Columns. Click tables


Name has all the tables/views. You can check with schema map also there.


If your query has resolved . would you mind to mark the answer correct and close this thread


antin_s
ServiceNow Employee
ServiceNow Employee

To get the list of ACLs:




var request = new sn_ws.RESTMessageV2();


request.setEndpoint('http://instancename.service-now.com/api/now/table/sys_security_acl?sysparm_limit=1');


request.setHttpMethod('GET');



var user = 'admin';


var password = 'admin';



request.setBasicAuth(user,password);


request.setRequestHeader("Accept","application/json");



var response = request.execute();


gs.log(response.getBody());




To get the ACL role Mapping:




var request = new sn_ws.RESTMessageV2();


request.setEndpoint('http://instancename.service-now.com/api/now/table/sys_security_acl_role?sysparm_limit=1');


request.setHttpMethod('GET');



var user = 'admin';


var password = 'admin';



request.setBasicAuth(user,password);


request.setRequestHeader("Accept","application/json");



var response = request.execute();


gs.log(response.getBody());



Hope this helps. Mark the answer as correct/helpful based on impact.



Thanks


Antin


khushnan
Kilo Contributor

Thanks Antin.



I am unable to fetch the result using REST API explorer in my instance. If it is not too much to ask you , will it be possible for you to share the ACL metadata with me here?



Regards