-
-
Notifications
You must be signed in to change notification settings - Fork 110
intunefilters
Tip
Please review the below documentation for all available properties and operators when creating filters in Microsoft Intune:
Important
Not all workloads support filters! Please review the below documentation for all supported workloads:
Using filters in Intune is far more performant than using dynamic Entra groups.
DO | DON'T | |
---|---|---|
Use the built-in virtual groups | ✅ Use the All users and All devices virtual groups instead of creating your own version of all users/all devices using Microsoft Entra dynamic groups. | ❌ Don't create your own "All users" or "All devices" dynamic groups for policy and app targeting in Intune. |
Reuse groups | ✅ Reuse the same group objects for assigning multiple policies. | ❌ Don't create duplicate copies of the same group to target different policies. ❌ Don't create dedicated "App groups" or "Policy groups". |
Make incremental group changes | ✅ Be careful with large group nesting changes in Microsoft Entra ID. | ❌ Don't make large group nesting changes all at once. |
Use filters to include and exclude | ✅ Use filters to achieve the correct user+device combination for targeting. | ❌ Don't mix user groups and device groups when using Include and Exclude groups. |
Note
Below are some example Filter syntaxes that can be used, not an exhaustive list. Filters can be combined to create more complex requirements.
Filters are created associated with a specific platform. You can't use a "Windows 10 and later" filter in an iOS scenario, for example.
(device.deviceOwnership -eq "Company")
(device.deviceOwnership -eq "Personal")
Tip
Do yourself a favour - Keep personal devices out of Intune!
(device.deviceName -eq "%DeviceName%")
Tip
Can be handy for quick troubleshooting or testing scenarios.
(device.operatingSystemVersion -eq "%OSVersion%")
- Examples:
(device.operatingSystemVersion -eq "17.6.1")
(device.operatingSystemVersion -ge "%MinimumOSVersion%")
- Examples:
(device.operatingSystemVersion -ge "15")
(device.manufacturer -eq "%ManufacturerName%")
(device.manufacturer -eq "%Manufacturer%") and (device.model -eq "%ModelName%")
- Examples:
(device.manufacturer -eq "Samsung") and (device.model -eq "SM-S918B")
(device.manufacturer -eq "Apple") and (device.model -eq "iPhone 13")
(device.manufacturer -eq "Dell Inc.") and (device.model -eq "Latitude 7420"
(device.deviceOwnership -eq "Corporate") and (device.operatingSystemVersion -le "10.0.22000.1000")
(device.deviceOwnership -eq "Corporate") and (device.operatingSystemVersion -ge "10.0.22000.1000")
(device.manufacturer -eq "Microsoft Corporation") and (device.model -startswith "Cloud PC")
(device.manufacturer -eq "Microsoft Corporation") and (device.model -startswith "Dev Box")
(device.manufacturer -eq "Microsoft Corporation") and (device.model -eq "Virtual Machine")
(device.operatingSystemSKU -eq "ServerRdsh")
(device.deviceTrustType -eq "Azure AD joined")
(device.deviceTrustType -eq "Hybrid Azure AD joined")
(device.deviceOwnership -eq "Corporate") and (device.enrollmentProfileName -eq "%ProfileName%")
Warning
This filter can break if you go and change the name of the Autopilot profile in the future!
- Microsoft
(device.manufacturer -eq "Microsoft Corporation")
- Dell
(device.manufacturer -eq "Dell Inc.")
- HP
(device.manufacturer -in ["HP Inc.", "HP", "Hewlett-Packard"])
- Lenovo
(device.manufacturer -eq "Lenovo")
(device.cpuArchitecture -eq "arm64")
(device.cpuArchitecture -eq "x64")
(device.enrollmentProfileName -eq "%EnrolmentProfileName%")
(device.enrollmentProfileName -eq null)
(device.enrollmentProfileName -eq null)
Important
If you happen to have enrolled corporate-owned devices like this as well as personal, the only additional delineation you could make would be to add the device.deviceOwnership -eq "Personal"
or device.deviceOwnership -eq "Corporate"
properties.
It is recommended to enrol corporate devices using an appropriate corporate-owned enrolment method.
Corporate-owned dedicated devices, Corporate-owned, fully managed user devices, or Corporate-owned devices with work profile:
(device.enrollmentProfileName -eq "%EnrollmentProfileName%")