You can use the following script to remove an AD object from a group after it has been added to another group. To use it with Adaxes, you need to create a business rule triggered after adding a member to a group. Use the Run a program or PowerShell script action to execute the script.
Parameters:
- $groupDN - specifies the distinguished name (DN) of the group to remove the user from.
PowerShell
$groupDN = "CN=Group1,CN=Users,DC=example,DC=com" # TODO: modify me
$objectPath = "Adaxes://%member%"
$group = $Context.BindToObjectByDN($groupDN)
$group.Remove($objectPath)