Hello,
The solution will include a Home Page action and a Business Rule triggering After Updating a User. The action will be used to specify a group that will be made primary for the user in the Assistant property. The Business Rule will run a script to add the user to the specified group, make it primary for the user and clear the Assistant property in the user account.
i. Creating the Home Page Action.
- Launch Adaxes Web Interface Customization Tool.
- Select the interface type and click Configure Home Page Actions on the General tab.

- Click Add and select Modify User action.

- On step 2 of the wizard, define the conditions for selecting the user to be modified and click Next.
- Select Use customized form and click Customize Form.

- Delete all the sections except for one (e.g. General).
- Delete all the properties from the section and click Add below Section fields.

- Double-click the Assistant property.

- Select Show only the following object types.
- Select Security Groups and click OK three times.

ii. Creating the Business Rule triggering After Updating a User
-
Launch Adaxes Administration Console.
-
Right-click your Adaxes service node, navigate to New and click Business Rule.

-
On step 2 of the Create Business Rule wizard, select User Object type.
-
Select After Updating a User and click Next.

-
Click Add Action and select Run a program or PowerShell script.
-
Paste the script below into the Script field.
$group = $Context.BindToObjectByDN("%assistant%")
$groupToken = $group.Get("primaryGroupToken")
if ("%primaryGroupID%" -eq $groupToken)
{
return
}
if (-not($group.IsMember($Context.TargetObject.AdsPath)))
{
$group.Add($Context.TargetObject.AdsPath)
}
$Context.TargetObject.Put("primaryGroupID", $groupToken)
$Context.TargetObject.Put("secretary", $NULL)
$Context.TargetObject.SetInfo()
-
Enter a short description and click OK.

-
Right-click the action and click Add Condition.

-
Select If <property> changed.
-
Select If Assistant has changed and click OK.

-
Right-click the action and click Add Condition again.
-
Select If <property><relation><value>.
-
Select If Assistant is not empty and click OK.

-
Click Next and finish creating the Business Rule. You should have something like the following:
