Only allow admins to delete user records

Philip Conforzi
Tera Contributor

Hello ServiceNow Community,

 

I hope you're doing well!

 

I am currently trying to create an ACL rule that only allows users with the Admin role to delete records from the sys_user table. Additionally, I only want users with the admin role to delete records from the sys-user table is that record is no longer active.

 

I'm having issues getting this to fire properly. Will this require any additional scripting? Is there an ACL that is conflicting with this?

 

I've attached the image of my solution below.

 

Let me know your thoughts!

 

PhilipConforzi_0-1707745863046.png

 

5 REPLIES 5

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Philip Conforzi 

 

Try Active = False , instead of Active is not True.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Dr Atul G- LNG
Tera Patron
Tera Patron

Also , OOTB only admin can delete or user with user_admin role can delete user. 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hey Atul,

 

Question on this. Is there a way to restrict users with the user_admin role from deleting recors in the sys_user table? Or is it a default ability of the role like it is for admin?

 

Let me know,

 

Thanks!

Hi @Philip Conforzi 

 

It's OOTB but if you want to restrict you need to create ACL as suggested by @Shivambitanwar1 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************