ACL issues

Imran4
Tera Contributor

Hi Community!

I am having an issue with the ACL. I have created an Table level ACL with snc_internal and I haven't added any conditions so that it can run on all the records. In the Script part, I have given that the logged in User should be part of the group to access the table. When I check the access, All the user with snc_internal role can access this. When I check that in the Access Analyzer, I found that the Script part is skipped. How to force the ACL to run the script and give the access to the only users who are part of this group alone. And I have checked that no other ACL is giving the access. So please recommend a solution to resolve this issue. Thank you.

Imran4_0-1777882623674.png

answer = gs.getUser().isMemberOf("MY_GROUP");

 

2 ACCEPTED SOLUTIONS

Shruti
Giga Sage

Hi

Try below script

answer = false;

if (gs.getUser().isMemberOf('Your Group Name Or SysID'))

{

answer = true;

}

 

If the above does not work, it is likely another OOB (Out-of-the-Box) ACL is granting access. You may need a change decision type to "Deny-Unless" instead of Allow if

View solution in original post

Tanushree Maiti
Kilo Patron

Hi @Imran4 

 

Update the ACL to table.* instead of table.None.

table.* ACLs govern access to individual fields and often trigger script evaluation more consistently.

 

When Access Analyzer skips the script, it typically means the Requires role section is passing, and the system is not forced to evaluate the script.

 

And lastly In ACL script Use the sys_id of the group instead of the name (Hard Coding) to avoid issues with name changes.

answer = gs.getUser().isMemberOf('<sys_id_of your group>');

 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

View solution in original post

2 REPLIES 2

Shruti
Giga Sage

Hi

Try below script

answer = false;

if (gs.getUser().isMemberOf('Your Group Name Or SysID'))

{

answer = true;

}

 

If the above does not work, it is likely another OOB (Out-of-the-Box) ACL is granting access. You may need a change decision type to "Deny-Unless" instead of Allow if

Tanushree Maiti
Kilo Patron

Hi @Imran4 

 

Update the ACL to table.* instead of table.None.

table.* ACLs govern access to individual fields and often trigger script evaluation more consistently.

 

When Access Analyzer skips the script, it typically means the Requires role section is passing, and the system is not forced to evaluate the script.

 

And lastly In ACL script Use the sys_id of the group instead of the name (Hard Coding) to avoid issues with name changes.

answer = gs.getUser().isMemberOf('<sys_id_of your group>');

 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: