There is no built-in functionality for that in Adaxes. We are planning to implement such functionality in one of the nearest releases. However, we can suggest a workaround for you right now. You can create a Home Page Action for Adaxes Web interface that will allow users to select a group and input a comma-separated list of SAMAccountNames of the users that you want to add to the group. When you click OK, a Business Rule is triggered that will add the users to the selected group using a PowerShell script.
To implement such a solution, you need to create a Home Page Action that will modify a group and will contain only one property on the form. The property will be used to input the names of the users and pass them to the PowerShell script. For this purpose you can use an Adaxes virtual property that can store string (text) data, for example CustomAttributeText1. Adaxes virtual properties are not stored in Active Directory, but you may use them as any other property of directory objects.
Then, you can create a Business Rule that will be triggered after updating a group and will check the value of the property that you chose to pass usernames. If the property is not empty, the Business Rule will use a PowerShell script to split the text passed by the property into separate user names and add the specified users to the group. Also, you can set up the display name for the CustomAttributeText1 property for it to be more informative for your users.
I. Create a Home Page Action with a customized input form
- On the computer, where your Web Interface is installed, start the Web Interface Customization tool.
- In the Interface type drop-down list, select the Web Interface you want to configure.
- Activate the General tab, select the Actions pane option, and click Configure Home Page Actions.
- In the dialog box that appears, click Add.
- On the 1st step of the Add Home Page Action wizard that appears, select Modify and choose Group from the associated drop-down list.
- On the 4th step of the wizard, select Use customized form and click Customize Form.
- In the Customize Form dialog that appears, you need to remove all the fields in the General section. On how to delete fields, refer to step 6 of the Customize Forms for User Creation and Editing Tutorial.
- Now, you need to add the virtual property that you will use on your form. To add a property to a web Interface form, click the Add button below the Section fields section.
- In the dialog box that appears, you need to select the virtual property that you will use. As virtual properties are not displayed by default, you need to tick Show all properties to be able to select them.
- Select the virtual property that you will use, for example CustomAttributeText1.
- Click OK.
- Finish the Add Home Page Action wizard.
II. Create a Business Rule that will add users to groups
- Create a new Business Rule.
- On the 2nd step of the Create Business Rule wizard, select Group and After Updating a Group.
- On the 3rd step, add the Run a program or PowerShell script action and paste the following script from our Script Repository: Add users to group in bulk.
- In the script, $propertyForUsernames specifies the LDAP display name of the property that will be used to specify new group members. Specify the same property as you added on the form of your Home Page Action.
- Add a short description for the script and click OK.
- Now you have to add a condition when the script will be triggered. The names of the users will be passed in the CustomAttributeText1 property, so we need to check in the Business Rule whether CustomAttributeText1 is not empty. To do this, click the Add Condition button.
- In the dialog box that appears, select the If <property> <relation> <value> condition.
- In the <property> drop-down list, select Show all properties.
- Select the property that you chose to pass usernames.
- Select is not empty.
- Click OK and finish creation of the Business Rule.
As to adding groups to a user, you can use a similar approach, but will require a slightly different script and Home Page Action. If you want, we can provide you with instructions on how to accomplish this.