Dynamic membership for administrative units
Microsoft's edit ·
Microsoft's commit message in MicrosoftDocs/entra-docs · commit dbff8db · +28 −28 lines · also on GitHub
11
---
2
−title: Manage users or devices for an administrative unit with dynamic membership rules (Preview)
3
−description: Manage users or devices for an administrative unit with dynamic membership rules (Preview) in Microsoft Entra ID
2
+title: Manage users or devices for an administrative unit with rules for dynamic membership groups (Preview)
3
+description: Manage users or devices for an administrative unit with rules for dynamic membership groups (Preview) in Microsoft Entra ID
44
55
author: rolyon
66
manager: amycolannino
77
ms.service: entra-id
88
ms.topic: how-to
99
ms.subservice: role-based-access-control
10
−ms.date: 05/13/2022
10
+ms.date: 08/25/2024
1111
ms.author: rolyon
1212
ms.reviewer: anandy
1313
ms.custom: oldportal, it-pro, has-azure-ad-ps-ref, azure-ad-ref-level-one-done
1414
---
1515
16
−# Manage users or devices for an administrative unit with dynamic membership rules (Preview)
16
+# Manage users or devices for an administrative unit with rules for dynamic membership groups (Preview)
1717
1818
> [!IMPORTANT]
1919
> Dynamic membership rules for administrative units are currently in PREVIEW.
2020
> See the [Product Terms](https://aka.ms/EntraPreviewsTermsOfUse) for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
2121
22
−You can add or remove users or devices for administrative units manually. With this preview, you can add or remove users or devices for administrative units dynamically using rules. This article describes how to create administrative units with dynamic membership rules using the Microsoft Entra admin center, PowerShell, or Microsoft Graph API.
22
+You can add or remove users or devices for administrative units manually. With this preview, you can add or remove users or devices for administrative units dynamically using rules. This article describes how to create administrative units with rules for dynamic membership groups using the Microsoft Entra admin center, PowerShell, or Microsoft Graph API.
2323
2424
> [!NOTE]
25
−> Dynamic membership rules for administrative units can be created using the same attributes available for dynamic groups. For more information about the specific attributes available and examples on how to use them, see [Dynamic membership rules for groups in Microsoft Entra ID](~/identity/users/groups-dynamic-membership.md).
25
+> Dynamic membership rules for administrative units can be created using the same attributes available for dynamic membership groups. For more information about the specific attributes available and examples on how to use them, see [Manage rules for dynamic membership groups in Microsoft Entra ID](~/identity/users/groups-dynamic-membership.md).
2626
27
−Although administrative units with members assigned manually support multiple object types, such as user, group, and devices, it is currently not possible to create an administrative unit with dynamic membership rules that includes more than one object type. For example, you can create administrative units with dynamic membership rules for users or devices, but not both. Administrative units with dynamic membership rules for groups are currently not supported.
27
+Although administrative units with members assigned manually support multiple object types, such as user, group, and devices, it is currently not possible to create an administrative unit with rules for dynamic membership groups that includes more than one object type. For example, you can create administrative units with rules for dynamic membership groups for users or devices, but not both. Administrative units with rules for dynamic membership groups for groups are currently not supported.
2828
2929
## Prerequisites
3030
⋯ 9 unchanged lines
4040
4141
For more information, see [Prerequisites to use PowerShell or Graph Explorer](prerequisites.md).
4242
43
−## Add dynamic membership rules
43
+## Add rules for dynamic membership groups
4444
45
−Follow these steps to create administrative units with dynamic membership rules for users or devices.
45
+Follow these steps to create administrative units with rules for dynamic membership groups for users or devices.
4646
4747
### Microsoft Entra admin center
4848
⋯ 11 unchanged lines
6060
6161
1. Select **Add dynamic query**.
6262
63
−1. Use the rule builder to specify the dynamic membership rule. For more information, see [Rule builder in the Azure portal](~/identity/users/groups-dynamic-membership.md#rule-builder-in-the-azure-portal).
63
+1. Use the rule builder to specify the dynamic membership groups rule. For more information, see [Rule builder in the Azure portal](~/identity/users/groups-dynamic-membership.md#rule-builder-in-the-azure-portal).
6464
6565

6666
67
−1. When finished, select **Save** to save the dynamic membership rule.
67
+1. When finished, select **Save** to save the dynamic membership groups rule.
6868
6969
1. On the **Properties** page, select **Save** to save the membership type and query.
7070
7171
The following message is displayed:
7272
73
− After changing the administrative unit type, the existing membership might change based on the dynamic membership rule you provide.
73
+ After changing the administrative unit type, the existing membership might change based on the dynamic membership groups rule you provide.
7474
7575
1. Select **Yes** to continue.
7676
77
−For steps on how to edit your rule, see the following [Edit dynamic membership rules](#edit-dynamic-membership-rules) section.
77
+For steps on how to edit your rule, see the following [Edit rules for dynamic membership groups](#edit-dynamic-membership-rules) section.
7878
7979
### PowerShell
8080
81
−1. Create a dynamic membership rule. For more information, see [Dynamic membership rules for groups in Microsoft Entra ID](~/identity/users/groups-dynamic-membership.md).
81
+1. Create a dynamic membership groups rule. For more information, see [Manage rules for dynamic membership groups in Microsoft Entra ID](~/identity/users/groups-dynamic-membership.md).
8282
8383
1. Use the [Connect-MgGraph](/powershell/microsoftgraph/authentication-commands#using-connect-mggraph) command to connect with Microsoft Entra ID with a user that has been assigned the Privileged Role Administrator role.
8484
⋯ 1 unchanged line
8686
Connect-MgGraph -Scopes "AdministrativeUnit.ReadWrite.All"
8787
```
8888
89
−1. Use the [New-MgDirectoryAdministrativeUnit](/powershell/module/microsoft.graph.identity.directorymanagement/new-mgdirectoryadministrativeunit) command to create a new administrative unit with a dynamic membership rule using the following parameters:
89
+1. Use the [New-MgDirectoryAdministrativeUnit](/powershell/module/microsoft.graph.identity.directorymanagement/new-mgdirectoryadministrativeunit) command to create a new administrative unit with a dynamic membership groups rule using the following parameters:
9090
9191
- `MembershipType`: `Dynamic` or `Assigned`
9292
- `MembershipRule`: Dynamic membership rule you created in a previous step
⋯ 14 unchanged lines
107107
108108
### Microsoft Graph API
109109
110
−1. Create a dynamic membership rule. For more information, see [Dynamic membership rules for groups in Microsoft Entra ID](~/identity/users/groups-dynamic-membership.md).
110
+1. Create a dynamic membership groups rule. For more information, see [Dynamic membership rules for groups in Microsoft Entra ID](~/identity/users/groups-dynamic-membership.md).
111111
112
−1. Use the [Create administrativeUnit](/graph/api/directory-post-administrativeunits?view=graph-rest-beta&preserve-view=true) API to create a new administrative unit with a dynamic membership rule.
112
+1. Use the [Create administrativeUnit](/graph/api/directory-post-administrativeunits?view=graph-rest-beta&preserve-view=true) API to create a new administrative unit with a dynamic membership groups rule.
113113
114
− The following shows an example of a dynamic membership rule that applies to Windows devices.
114
+ The following shows an example of a dynamic membership groups rule that applies to Windows devices.
115115
116116
Request
117117
⋯ 13 unchanged lines
131131
}
132132
```
133133
134
−## Edit dynamic membership rules
134
+## Edit rules for dynamic membership groups
135135
136
−When an administrative unit has been configured for dynamic membership, the usual commands to add or remove members for the administrative unit are disabled as the dynamic membership engine retains the sole ownership of adding or removing members. To make changes to the membership, you can edit the dynamic membership rules.
136
+When an administrative unit has been configured for dynamic membership groups, the usual commands to add or remove members for the administrative unit are disabled as the dynamic membership groups engine retains the sole ownership of adding or removing members. To make changes to the membership, you can edit the rules for dynamic membership groups.
137137
138138
### Microsoft Entra admin center
139139
⋯ 1 unchanged line
141141
142142
1. Browse to **Identity** > **Roles & admins** > **Admin units**.
143143
144
−1. Select the administrative unit that has the dynamic membership rules you want to edit.
144
+1. Select the administrative unit that has the rules for dynamic membership groups you want to edit.
145145
146
−1. Select **Membership rules** to edit the dynamic membership rules using the rule builder.
146
+1. Select **Membership rules** to edit the rules for dynamic membership groups using the rule builder.
147147
148148

149149
150150
You can also open the rule builder by selecting **Dynamic membership rules** in the left navigation.
151151
152
−1. When finished, select **Save** to save the dynamic membership rule changes.
152
+1. When finished, select **Save** to save the dynamic membership groups rule changes.
153153
154154
### PowerShell
155155
156
−Use the [Update-MgDirectoryAdministrativeUnit](/powershell/module/microsoft.graph.identity.directorymanagement/update-mgdirectoryadministrativeunit) command to edit the dynamic membership rule.
156
+Use the [Update-MgDirectoryAdministrativeUnit](/powershell/module/microsoft.graph.identity.directorymanagement/update-mgdirectoryadministrativeunit) command to edit the dynamic membership groups rule.
157157
158158
```powershell
159
−# Set a new dynamic membership rule for an administrative unit
159
+# Set a new dynamic membership groups rule for an administrative unit
160160
$adminUnit = Get-MgDirectoryAdministrativeUnit -Filter "displayName eq 'Example Admin Unit'"
161161
$params = @{
162162
membershipRule = "(user.country -eq 'Germany')"
⋯ 4 unchanged lines
167167
168168
### Microsoft Graph API
169169
170
−Use the [Update administrativeUnit](/graph/api/administrativeunit-update?view=graph-rest-beta&preserve-view=true) API to edit the dynamic membership rule.
170
+Use the [Update administrativeUnit](/graph/api/administrativeunit-update?view=graph-rest-beta&preserve-view=true) API to edit the dynamic membership groups rule.
171171
172172
Request
173173
⋯ 11 unchanged lines
185185
186186
## Change a dynamic administrative unit to assigned
187187
188
−Follow these steps to change an administrative unit with dynamic membership rules to an administrative unit where members are manually assigned.
188
+Follow these steps to change an administrative unit with rules for dynamic membership groups to an administrative unit where members are manually assigned.
189189
190190
### Microsoft Entra admin center
191191
⋯ 21 unchanged lines
213213
214214
### PowerShell
215215
216
−Use the [Update-MgDirectoryAdministrativeUnit](/powershell/module/microsoft.graph.identity.directorymanagement/update-mgdirectoryadministrativeunit) command to edit the dynamic membership rule.
216
+Use the [Update-MgDirectoryAdministrativeUnit](/powershell/module/microsoft.graph.identity.directorymanagement/update-mgdirectoryadministrativeunit) command to edit the dynamic membership groups rule.
217217
218218
```powershell
219219
# Change an administrative unit to assigned
⋯ 32 unchanged lines
Microsoft's Markdown source from MicrosoftDocs/entra-docs, © Microsoft Corporation, under MIT. Changed lines with up to 3 unchanged lines around each; ChangeIntel kept this copy 26 Oct 06:37 UTC. The commit date is when the source changed, which can be hours or days before Learn published it.