Hi,

would it be possible to achieve the following idea:

Creating and updating rule based groups, based on user attributes like company?

For each company value in AD, there should be a rule based group looking for this company.

So in theory, we need to get all unique company values, then create a group with this company value as filter.

by (2.6k points)

1 Answer

by (309k points)
0 votes

Update

Starting with Adaxes 2020.1, you can configure groups to be rule-based without using scheduled tasks and/or scripts. For details, have a look at section Rule-based groups of the following tutorial: https://www.adaxes.com/help/AddUsersToGroupsByDepartment/#dynamicgroups.

Original

Hello,

It is possible using a scheduled task and a PowerShell script. The script will need to do the following:

  1. Find all the unique property values.
  2. Find all the existing rule-based groups.
  3. Check each group for a rule containing the criteria based property value.
  4. For all the property values that do not correspond to criteria in the found groups, create a new rule-based group.

It would significantly decrease the timing for the script execution if all those groups are located in a single OU. Unfortunately, we do not have such a script, but the following article should be a good starting point: https://www.adaxes.com/sdk/IAdmGroup2.

by (2.6k points)
0

Ok, I will try this and have the first blocker How to read the rule?

I tried this

[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")

# Connect to the Adaxes service
$ns = New-Object "Softerra.Adaxes.Adsi.AdmNamespace"
$service = $ns.GetServiceDirectly("localhost")

# Bind to the group
$groupDN = "mygroupdn"
$group = $service.OpenObject("Adaxes://$groupDN", $null, $null, 0)

# 
$rules = $group.MembershipRules

$rules shows me

Type                 : ADM_BUSINESSUNITMEMBERSHIPTYPE_QUERY
BaseObjectPath       : Adaxes://<GUID=17894c9b-0451-4e83-a5c2-962ab06ac1e7>
BaseObjectDnTemplate : 
Scope                : ADS_SCOPE_SUBTREE
Exclude              : False
Disabled             : False

How can I now read/create/update the rule?

by (309k points)
0

Hello,

The MembershipRules property returns an object represented by the IAdmBusinessUnitMembershipRules interface. It is a collection and you need to iterate through the items in the collection to find the required membership rule and check its criteria. Membership rules in the collection are each represented by the IAdmBusinessUnitMembershipRule interface.

Related questions

We are trying to extend our Adaxes management to O365 / Azure only user objects. Currently we use employee type to add traditional active directory accounts to business units and ... so, can this be used to create dynamic mail enabled security groups in O365?

asked May 3, 2022 by adaxes_user2 (40 points)
0 votes
1 answer

I am trying to create a business rule to send an email to the manager of the group when a member is added or removed from a rule-based group. I have created the business rule and it works for other groups but not for a rule-based group. Can this be done?

asked Jul 19, 2021 by mark.it.admin (2.3k points)
0 votes
1 answer

We would like to be able to, possibly through a script or report, search for attributes that equal specific values and find all rule-based groups that used those rules. An ... and being able to list all rule-based groups that use that in their query set.

asked Oct 5, 2022 by wesmcmillan (20 points)
0 votes
1 answer

I have a custom adaxes attribute that I would like to utlitize in Rule Based groups; it does not look like they are available to select, however. Example: want something ... to group. Is this possible to make them visable in the Rule Based queries somehow?

asked 2 days ago by stevemkoenig (40 points)
0 votes
1 answer

Hi team, Due to some restructuring in our native AD, we need to update our rule-based groups - specifically the scope of the rules, which need to be changed from ... manage this? I already looked at the SDKs but could not find the best approach. Thanks

asked May 19 by wintec01 (2.6k points)
0 votes
1 answer