I have a business rule question regarding interaction with security groups.

OSAdmin
Valued Contributor
Originally posted by Kyle Nelson

9/5/2019

I have a business rule question regarding interaction with security groups. So the background is, we have hundreds of security groups that we thought we would need. We found another solution and want to clean up the security groups by deleting all of these extra groups. Has anyone ever used BRApi.Security functions before to pull a long list of identifiable groups and delete them? Or have you tried something else that achieves the same result?

1 REPLY 1

OSAdmin
Valued Contributor
Originally posted by Nick Kroppe

Here's some code you come take and tailor to your use case. In the example below, I am retrieving a list of all security groups in the application, looping through them, and then deleting all the groups that have a prefix of ""RCM_"". Hopefully you have logical criteria you can use to implement to make this seamless and doable in one swoop. I would recommend dropping this code in an extender type business rule (found within the extensibility rules section) which will allow you to run the rule directly from the business rule page itself or via a DM job. Let me know if you have any questions.


3817c343db611c108feee3a84b961973.png