Prepare infrastructure for devices · Topic 2 of 7
Device Groups and Dynamic Membership Rules
MD-102 device groups: plan assigned and dynamic Microsoft Entra device groups, write membership rules, and use device categories to group at enrollment.
- 4 min
- Dynamic groups need Entra ID P1, hold users or devices but not both, and update with a delay.
- Autopilot group tags appear in devicePhysicalIds as
[OrderID]:value. - Device categories are chosen at enrollment and can drive dynamic device groups.
What it is
Policies, apps and updates are assigned to groups. For devices, you use Microsoft Entra security groups that either have assigned members or dynamic members chosen by a rule. A group of devices gets settings no matter who signs in, while a group of users follows the person across devices. Good group design makes every later assignment simpler.
How it works
Assigned and dynamic groups
| Group type | Membership | Use |
|---|---|---|
| Assigned | You add members by hand, or a process adds them | Pilot rings, small fixed sets, enrollment time grouping |
| Dynamic device | A rule adds or removes devices automatically from device attributes | Everything that follows a property, such as all corporate Windows devices |
| Dynamic user | A rule on user attributes | Targeting by department or location |
Dynamic groups require Microsoft Entra ID P1. A dynamic group contains either users or devices, never both. Membership is not instant. It is evaluated by the service, so a device can wait minutes, sometimes longer, to appear. For rollouts that must be applied at once, an assigned group or enrollment time grouping is more reliable.
Writing dynamic device rules
A rule compares a device property with a value.
(device.deviceOwnership -eq "Company") and (device.deviceOSType -eq "Windows")
(device.deviceCategory -eq "Frontline")
(device.enrollmentProfileName -eq "Kiosk Profile")
(device.devicePhysicalIds -any (_ -contains "[OrderID]:Marketing"))
(device.displayName -startsWith "LAB-")
| Property | Meaning |
|---|---|
| deviceOwnership | Company or Personal |
| deviceOSType and deviceOSVersion | Operating system and version |
| deviceCategory | The category chosen at enrollment |
| enrollmentProfileName | The Apple, Android or Windows enrollment profile used |
| devicePhysicalIds | Holds the Autopilot group tag, written as [OrderID]:value |
| displayName | The device name, often matched with a prefix |
| managementType | MDM or MAM |
Use -eq, -ne, -startsWith, -contains, -in and -match, and combine rules with -and and -or. The Validate rules option in the portal tests a rule against sample devices.
Device categories
A device category is a label such as Nursing or Marketing. Users on iOS, Android and Windows personal devices can choose one during enrollment through the Company Portal, and an admin can set it on any device. Create categories under Devices, Organize devices, Device categories. A dynamic device group with (device.deviceCategory -eq "Nursing") then collects those devices, so a Wi-Fi profile for nursing staff can target them automatically. Creating, editing or deleting categories can be protected by Multi Admin Approval.
Device groups or user groups
| Assign to | Result |
|---|---|
| A user group | Settings follow the user to every enrolled device. Good for per user items such as email profiles |
| A device group | Settings apply to the device regardless of who signs in. Good for shared devices, kiosks and hardware specific settings |
For compliance, deploying to devices gives clearer reporting. For apps, deploy to users when the app belongs to the person, and to devices when it belongs to the machine, such as a kiosk app.
Planning groups
- Use naming conventions that show purpose, such as
DEV-Win-Corp-Pilot. - Keep a pilot group and assign new policies to it first.
- Avoid overlapping rules that cause conflicting assignments. Use exclude assignments sparingly.
- Dynamic groups cannot contain nested groups. An assigned group can contain other groups, though not every Intune assignment supports nesting equally.
- Groups for Autopilot: a dynamic rule on the group tag places a device in the right group once it is registered.
A worked scenario
An IT team wants every company owned Windows laptop to get the baseline policy, and a pilot of 20 devices to receive updates first. They create a dynamic group with (device.deviceOwnership -eq "Company") and (device.deviceOSType -eq "Windows") for the baseline, and an assigned group named Pilot-Updates for the pilot. The retail stores use a device category called Store, and a dynamic rule on deviceCategory collects those devices for the store Wi-Fi profile.
What to remember for the exam
- Dynamic groups need Entra ID P1, hold users or devices but not both, and update with a delay.
- Autopilot group tags appear in devicePhysicalIds as
[OrderID]:value. - Device categories are chosen at enrollment and can drive dynamic device groups.
- Assign to user groups for per person settings and to device groups for per device settings.
- A dynamic device group matches properties such as deviceOwnership, deviceOSType and enrollmentProfileName.
When a scenario needs immediate membership at enrollment, use an assigned group with enrollment time grouping instead of a dynamic group.
How the exam asks about this
- "Automatically collect all company owned Windows devices." A dynamic device group on deviceOwnership and deviceOSType.
- "Place devices by the department the user picks during enrollment." Device categories and a deviceCategory rule.
- "Collect Autopilot devices by order tag." devicePhysicalIds with the OrderID value.
- "A dynamic group does not contain the new devices yet." Membership evaluation delay.
Common mistakes
Mixing users and devices in a dynamic group. It is not allowed.
Expecting instant membership. Dynamic rules are evaluated later.
Using a user group for a kiosk setting. The settings follow whoever signs in.
Forgetting Entra ID P1. Dynamic groups need it.
Check yourself
Which license do dynamic groups need?
Microsoft Entra ID P1.
Which property holds an Autopilot group tag?
devicePhysicalIds, as [OrderID]:value.
When should you assign to a device group?
When settings belong to the device, such as shared devices and kiosks.
Topic 2 of 7 in Prepare infrastructure for devices
Test yourself on Prepare infrastructure for devices
The full Microsoft MD-102 question bank has 658 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Microsoft. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.