0 votes

Hello,

When a user account is created, we would like for that user to be added to a group whose name is based on a certain naming convention. If the group doesn't yet exist, it would need to be created.

The group naming convention is UAC-VEN-%l%

So for example, if inputting "Tokyo" in the city field of the user creation form, it will add the user to the UAC-VEN-Tokyo group. If that group doesn't exist, it will first create the group and then add the user.

by (60 points)

1 Answer

0 votes
by (14.5k points)

Hello,

If the required groups are located in the same container, you can use a business rule triggering After creating a user to achieve the required. The rule conditions and actions will rely on the template of the required group distinguished name to check whether the group exists and to add the user to the group. The template will contain the value reference to the City property (%l%) to build the group distinguished name. If the group exists, the user will be added to the group. If the group does not exist, the rule will create the group. For details on how to create directory objects in business rules, custom commands, and scheduled tasks, have a look at the following tutorial: https://www.adaxes.com/help/CreateMultipleObjectsInOneOperation. When creating a group object this way, you can specify the group members in the action configuration. To add the created user to the new group, specify the %distinguishedName% value reference in the Member property. image.png

Finally, the business rule configuration should look like this: image.png

0

This worked great. I just added another line under the Else statement to add the user to the newly created group. Thank you very much!

0

Hello,

Thank you for the confirmation. However, there is no need to use a separate action to add the user to the created group. As we mentioned, it can be done in the same action where the group is created. Just specify the %distinguishedName% value reference in the Member property and the group will be created with the user added as a member.

0

I did that, but it would give an error saying that the specified account doesn't exist, so to avoid that, I included an extra line to add the user to the new group.

0

Hello,

Thank you for specifying. That is not an expected behavior. Please, clarify, how exactly the business rule and the action creating a group were configured when you faced the error. If it is convenient, please, post here or send us at support@adaxes.com screenshots of the rule and action configuration. Additionally, please, specify how the user account is created. Is it done in Adaxes using a built-in functionality?

Related questions

0 votes
1 answer

I need a group created based on %ipPhone% when ever a new user is provisioned. The group name has to match %ipPhone% and have email enabled and to be hidden from the address list. We are on Version 3.8.314823.0

asked Nov 6, 2018 by hgletifer (1.3k points)
0 votes
1 answer

For creating a computer object, we want to check if the entered CN is already used in our AD. And for that we want to use a powershell script. An other dot ... powershell script should be start before creating the computer object, right? Thanks for your help.

asked Jun 4 by KEME (80 points)
0 votes
1 answer

Hello, Was wondering if there is a script for a business rule or a property pattern that can be used for this request. I am wondering how can I do a check ... $Context.LogMessage("The email address '$emailAddress' is available.", "Information") return $false }

asked Nov 13 by KoleArmstrong (60 points)
0 votes
1 answer

I am trying to trigger processing outside of Active Directory when an account is created based on the source user account that was used. Does Adaxes store the source account anywhere?

asked Oct 9, 2023 by jnordell (20 points)
0 votes
1 answer

We have a business need for automating and controlling the creation of service accounts in our AD. For example, we want all new service accounts to start with "svc_" for ... customize the "New User" form to create a "New Service Account" workflow in Adaxes?

asked Sep 10, 2021 by joshua.lapchuk (60 points)
3,588 questions
3,277 answers
8,303 comments
548,091 users