This article outlines Active Roles Dynamic Group functionality and best practices.
Functionality
Dynamic Groups allow for the automation of group membership based on rules, which can consist of explicit include/exclude queries and specific objects.
Possible membership rules can be any combination of the following rule sets:
When multiple rules are configured, the order of precedence is as follows:
Dynamic Groups are updated constantly, as Active Roles polls for DirSync requests every 2 seconds and then updates any Dynamic Group that matches a rule - whether it is adding or removing a user from the group, it will do so immediately.
For all versions of Active Roles prior to 7.5.5, 7.6.3, 8.0.1, 8.1.1, Dynamic Groups will not be updated immediately if there are more than 1000 changes per request. For instance, if a bulk update is performed that exceeded 1000 changes to the Dynamic Group, Active Roles will ignore the immediate update, and it will then be updated when the Dynamic Group Updater scheduled task runs (default 3:00 AM UTC). Otherwise, you may click Rebuild on the Members tab of the group to force the update.
Starting in Active Roles 7.5.5, 7.6.3, 8.0.1, and 8.1.1, this limitation has been removed. Dynamic Groups will now update immediately, regardless of the number of changes.
In general, the membership list of a Dynamic Group is updated in any of these cases:
Potential Issues
For versions prior to 7.5.3:
When the Dynamic Group Updater scheduled task runs, the conditions are evaluated and then a membership list is created and then processed one by one. During this time, if the Dynamic Group Updater scheduled task detects an error during the update, it halts the update and the group may end up in an incorrect membership state. In this scenario, the Dynamic Group must be manually rebuilt by opening the group and clicking Rebuild. A rebuild will clear all Dynamic Group members and then re-add them.
Starting in 7.5.3, Active Roles performs a Delta operation on all rebuilds, and will no longer clear the entire group membership, unless the rules have been modified to cause this.
For Active Roles 8.2.1 SP6 and later:
The Dynamic Group logic was redesigned and functions as follows:
Best Practices
Nested Dynamic Groups
Nesting should always be used cautiously in any scenario. Particularly with Dynamic Groups, do the following:
General Best Practices
Membership Rules Best Practices
1. Always Design for Early Exit
Rule evaluation speed is entirely about how fast you can stop evaluating.
✅ Best practice: Ensure every Dynamic Group has at least one early‑exit rule from:
[0x4] Exclude Explicitly
[0x6] Exclude Group Members
[0x2] Exclude by Query
🚫 Anti‑pattern
Groups that begin evaluation at [0x1] Include by Query for every object.
✅ Why it matters
2️. Keep [0x1] Include by Query Minimal and Singular
✅ Best practice: Avoid a "Starts with" or "Contains" style query if an "Is (exactly)" option exists.
🚫 Anti‑pattern
(employeeType=R*)
(employeeType=*Regular*)
Include queries should identify candidates, not define the universe.
✅ Best practice
Limit [0x1] rules to one simple, high‑selectivity condition, such as:
(employeeType=Regular)
🚫 Anti‑pattern
Large OR‑driven [0x1] rules:
(| (attr=A)(attr=B)(attr=C)(attr=D)... )
✅ Why it matters
3️. Convert Inclusion Logic into Exclusion Logic Wherever Possible
“Everyone except X” should never be written as “include everyone who matches X”.
✅ Best practice: Invert logic and move complexity into [0x2] or [0x6].
Instead of:
[0x1] Include by Query: (&(employeeType=Regular)(department=SALES OR SELLING OR SALESPERSON...))
Use:
[0x1] Include by Query: (employeeType=Regular)
[0x2] Exclude by Query: (!(department=SALES OR SELLING OR SALESPERSON...))
✅ Why it matters
4️. Use [0x6] Exclude Group Members for High‑Cardinality Conditions
Group membership is cheaper than repeated attribute comparisons.
✅ Best practice:
Create helper groups for:
Reference them via [0x6]
[0x6] Exclude Group Members: CN=DG‑Excluded‑Users
✅ Why it matters
5. Never Stack Expensive Groups Without Guards
Dynamic Group cost multiplies when expensive rules stack.
✅ Best practice:
If a Dynamic Group references or overlaps other Dynamic Groups:
🚫 Anti‑pattern
Enterprise Dynamic Groups referencing other enterprise DGs without exclusions.
6. Prefer Query Exclusions Over Query Inclusions
Negative filters short‑circuit faster than positive ones.
✅ Best practice
Use [0x2] Exclude by Query to prune:
✅ Why it matters
© 2026 One Identity LLC. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center