Skip to content

Commit f0e3786

Browse files
committed
Acrolinx
1 parent b673522 commit f0e3786

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

articles/active-directory/enterprise-users/groups-dynamic-rule-streamline.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,26 @@ ms.collection: M365-identity-device-management
1919

2020
# Create simpler, more efficient rules for dynamic groups In Azure Active Directory
2121

22-
The team for Azure Active Directory (Azure AD) sees a lot of incidents related to dynamic groups and the processing time for their membership rules. This article contains the methods by which our engineering team helps customers to simplify their membership rule, which then improves processing time.
23-
24-
When writing membership rules to determine what users or devices get added to dynamic groups, there are steps you can take to ensure the rules are as efficient as possible. More efficient rules result in better dynamic group processing times.
22+
The team for Azure Active Directory (Azure AD) sees numerous incidents related to dynamic groups and the processing time for their membership rules. This article contains the methods by which our engineering team helps customers to simplify their membership rules. Simpler and more efficient rules result in better dynamic group processing times. When writing membership rules for dynamic groups, these are steps you can take to ensure the rules are as efficient as possible.
2523

2624

2725
## Minimize use of MATCH
2826

29-
Minimize the usage of the 'match' operator in rules as much as possible. Instead, explore if it is possible to use the 'contains,' 'startswith,' or -eq operators. Considering using other properties that allow you to write rules to select the users you want to be in the group without using the -match operator. For example, if you want a rule for the group for all users whose city is Lagos, then instead of using rules like:
27+
Minimize the usage of the 'match' operator in rules as much as possible. Instead, explore if it's possible to use the `contains`, `startswith`, or `-eq` operators. Considering using other properties that allow you to write rules to select the users you want to be in the group without using the `-match` operator. For example, if you want a rule for the group for all users whose city is Lagos, then instead of using rules like:
3028

3129
```powershell
3230
user.city -match "ago" or user.city -match ".*?ago.*"
3331
```
3432

35-
It is better to use rules like:
33+
It's better to use rules like:
3634

3735
`user.city -contains "ago,"` or
3836
`user.city -startswith "Lag,"` or
3937
best of all, `user.city -eq "Lagos"`
4038

4139
## Use fewer OR operators
4240

43-
In your rule, identify similar sub criteria with the same property equaling various values being linked together with a lot of -or operators. Instead, use the -in operator to group them into a single criterion to make the rule easier to evaluate. For example, instead of having a rule like this:
41+
In your rule, identify when it uses various values for the same property linked together with `-or` operators. Instead, use the `-in` operator to group them into a single criterion to make the rule easier to evaluate. For example, instead of having a rule like this:
4442

4543
```powershell
4644
(user.department -eq "Accounts" -and user.city -eq "Lagos") -or
@@ -50,19 +48,19 @@ In your rule, identify similar sub criteria with the same property equaling vari
5048
(user.department -eq "Accounts" -and user.city -eq "Port Harcourt")
5149
```
5250

53-
It is better to have a rule like this:
51+
it's better to have a rule like this:
5452

5553
```powershell
5654
user.department -eq "Accounts" -and user.city -in ["Lagos", "Ibadan", "Kaduna", "Abuja", "Port Harcourt"]
5755
```
5856

59-
Conversely, identify similar sub criteria with the same property not equaling various values, being linked with a lot of -and operators. Then use the -notin operator to group them into a single criterion to make the rule easier to understand and evaluate. For example, instead of using a rule like this:
57+
Conversely, identify similar sub criteria with the same property not equal to various values, that are linked with `-and` operators. Then use the `-notin` operator to group them into a single criterion to make the rule easier to understand and evaluate. For example, instead of using a rule like this:
6058

6159
```powershell
6260
(user.city -ne "Lagos") -and (user.city -ne "Ibadan") -and (user.city -ne "Kaduna") -and (user.city -ne "Abuja") -and (user.city -ne "Port Harcourt")
6361
```
6462

65-
It is better to use a rule like this:
63+
It's better to use a rule like this:
6664

6765
```powershell
6866
user.city -notin ["Lagos", "Ibadan", "Kaduna", "Abuja", "Port Harcourt"]
@@ -75,7 +73,7 @@ Ensure that you aren't using redundant criteria in your rule. For example, inste
7573
```powershell
7674
user.city -eq "Lagos" or user.city -startswith "Lag"
7775
```
78-
It is better to simply use a rule like this:
76+
It's better to use a rule like this:
7977

8078
```powershell
8179
user.city -startswith "Lag"

0 commit comments

Comments
 (0)