Hello,
Thank you for the confirmation. To achieve the desired, create a business rule triggering After adding a member to a group. The rule will execute the below script. In the script:
- $groupDNs - Specifies distinguished names (DNs) of the RBAC groups. For information on how to get an object DN, see https://adaxes.com/sdk/HowDoI.GetDnOfObject.
- $pipelined - Specifies whether the updates made by the script will be passed through the Adaxes pipeline to trigger corresponding business rules, create log records, etc.
$groupDNs = @("CN=Sales RBAC Group,OU=Groups,DC=domain,DC=com", "CN=Marketing RBAC Group,OU=Groups,DC=domain,DC=com", "CN=Dev RBAC Group,OU=Groups,DC=domain,DC=com") # TODO: modify me
$pipelined = $True # TODO: modify me
foreach ($groupDN in $groupDNs)
{
$group = $Context.BindToObjectByDNEx($groupDN, $pipelined)
if (($group.IsMember("Adaxes://%member%") -and ($groupDN -ne "%distinguishedName%")))
{
$group.Remove("Adaxes://%member%")
}
}
In the Activity Scope of the rule, add all the RBAC groups specified in the $groupDNs variable. Make sure to add the groups themselves (This object only), not their members. Finally, the rule will look like the following: