Hello Ben,
1. To have a checkbox on the user creation form, you can use a boolean attribute. Such attributes can be displayed as checkboxes in the Web Interface. We recommend using one of Adaxes virtual attributes, for example, CustomAttributeBoolean1. They are not stored in AD, but can be used the same as any other attributes of AD objects. Then, you need to create a Business Rule triggered after creating a user that will execute all the necessary actions only if the boolean attribute is set to True.
For example, to allow users to choose whether to create a remote mailbox, you need to do the following:
i. Add a virtual Boolean property to the Web Interface page for creating users
For information on how to do this, see step 6 in the Customize Forms for User Creation and Editing tutorial.
ii. Modify the Business Rule for creating remote mailboxes
Now, you need to add a condition to your Business Rule that assigns Office 365 licenses and enables remote mailboxes. You need to add a condition so that the actions would be executed only when the boolean attribute equals True. To do this:
- in your Business Rule, right-click one of the actions you've configured and click Add Condition.
- Select the If <property> <relation> <value> condition.
- Expand the <property> drop-down list.
- Select Show all properties.
- Select the virtual property that you chose to use, for example, CustomAttributeBoolean1.
- Select equals and True.
- Click OK.
iii. Specify a name for the virtual property
For information on how to do this, see Customizing Display Names for AD Properties. - - - - - -
2. It is not possible to add a new user to a group because the user account is not created yet. To add a user to a group, you need to specify the new member's Distinguished Name (DN) in the Member property of the group. As the user has not been created yet, the DN is not available.
However, there is a workaround. On the form for creating users, you can add a property that will allow selecting groups. For this purpose, you can use any multi-valued property that supports the DN syntax, for example, See Also.
Then, you need to create a Business Rule triggered after creating a user that will add the user to the groups specified via the property.
If you need, we can provide a detailed instruction to implement such a solution. Also, in the future, we will think on a possibility to make the functionality available in Adaxes out of the box. - - - - - -
3. A request to create a remote mailbox must be submitted against your on-premises Exchange Server, not against Office 365. In the script, specify the fully qualified domain name of your Exchange Server instead of outlook.office365.