0 votes

We have a need to set a group that is not domain users as the primary group. Is there an action we can do on a selected user to check the group we want as the primary group to that selected group?

by (3.2k points)

1 Answer

0 votes
by (289k points)
selected by
Best answer

Hello,

You can do this by modifying the Primary Group ID property of a user. For this purpose you can create a Custom Command that will update the property with the Primary Group Token of the required group. To get the token and create the Custom Command:

  1. Launch Adaxes Administration Console.
  2. Navigate to and select the group.
  3. Enable showing Advanced Properties. For details, see http://www.adaxes.com/help/?HowDoI.Mana ... rties.html.
  4. Copy the value of the Primary Group Token property.
  5. Right-click your Adaxes service node, navigate to New and click Custom Command.
  6. On step 2 of the Create Custom Command wizard, select User Object type and click Next.
  7. Click Add Action.
  8. Select Add the User to a group and click Select Group.
  9. Select the group the token of which you copied and click OK twice.
  10. Double-click Always.
  11. Select If is a member of <Group>.
  12. Select if is not and click Select Group.
  13. Select the group the token of which you copied and click OK twice.
  14. Click Add action to a new set.
  15. Select Update the User and click Add.
  16. In the Property to modify drop-down list, select Primary Group ID.
  17. Paste the Primary Group Token into the New value field and click OK twice.
  18. Click Next and finish creating the Custom Command.
0

If i read the solution properly, we would have to have a specific group set in the Custom Command, is that correct? If so, we would like to have solution that we can add any group to an account and make it the primary group as you can with ADuC or ADaC.

0

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.

  1. Launch Adaxes Web Interface Customization Tool.
  2. Select the interface type and click Configure Home Page Actions on the General tab.
  3. Click Add and select Modify User action.
  4. On step 2 of the wizard, define the conditions for selecting the user to be modified and click Next.
  5. Select Use customized form and click Customize Form.
  6. Delete all the sections except for one (e.g. General).
  7. Delete all the properties from the section and click Add below Section fields.
  8. Double-click the Assistant property.
  9. Select Show only the following object types.
  10. Select Security Groups and click OK three times.

ii. Creating the Business Rule triggering After Updating a User

  1. Launch Adaxes Administration Console.

  2. Right-click your Adaxes service node, navigate to New and click Business Rule.

  3. On step 2 of the Create Business Rule wizard, select User Object type.

  4. Select After Updating a User and click Next.

  5. Click Add Action and select Run a program or PowerShell script.

  6. 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()
  7. Enter a short description and click OK.

  8. Right-click the action and click Add Condition.

  9. Select If <property> changed.

  10. Select If Assistant has changed and click OK.

  11. Right-click the action and click Add Condition again.

  12. Select If <property><relation><value>.

  13. Select If Assistant is not empty and click OK.

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

0

The hyperlink pointing to how to show the Advanced Properties does not work.

0

Hello,

The article was removed from our help documentation log ago. To enable displaying advanced properties in the administration console:

  1. In the Console Tree, select an object.
  2. In the top right corner of the Result Pane on the right, click the wheel button.
  3. In the drop-down list, click Advanced Properties. image.png
  4. Specify the properties you need or select Show All and click OK.

Related questions

0 votes
1 answer

I have a need to remove certain users from "Domain Users" and set their primary group to a custom one. I can't seem to find anyway in Adaxes to set a primary group. ... 't remove the user from their primary group. Running on 2011.1 trial version at the moment.

asked Apr 26, 2011 by Rojs (90 points)
0 votes
1 answer

Hi team, I am trying to set a primary smtp address to a user based on input during creation. If someone set a specific email in form, this is stored in customAttributeText3 and ... a specifc email address as primary? Do I need to run a PS command to set it?

asked Oct 13, 2023 by wintec01 (1.5k points)
0 votes
1 answer

I need set, or verify, that all of my users have the same primary email alias suffix. Several years ago, we rebranded to a new internet presence. All users yhave both ... really a very great answer. Looking for automation, and we are an Adaxes supported shop.

asked May 14, 2021 by IanMcLaws (20 points)
0 votes
1 answer

We have a 3rd party vendor that we are able to add users based on AD security groups. What I need to do is set a parameter for the number of available licenses and whenever ... the group is 495 I would like an email to trigger telling me to add more licenses.

asked Oct 12, 2022 by A_Pastor (70 points)
0 votes
1 answer

Hi, we need to create some form (or custom command?) so managers of distribution groups can add/remove/change alias address. Primary and secondary. Distribution groups are ... contains list of current aliases with possibility to edit them... Thank you Sebela

asked Nov 18, 2019 by KIT (960 points)
3,548 questions
3,238 answers
8,232 comments
547,811 users