Narrowing an Intune Policy to the Right Devices with an Assignment Filter
Need an Intune policy on only some devices in a group? Build an assignment filter, preview matches, pick Include or Exclude and read the Filter evaluation report.

Advertising disclosure: this article includes partner links. KBY may earn a commission if you sign up or buy through one, at no extra cost to you. How we make money.
Before you begin
- A lab or test Microsoft Intune tenant, or a test group in a tenant where you are allowed to practise.
- One enrolled Windows device whose name starts with LAB-, and ideally a second enrolled device whose name does not.
- A test Entra ID device group containing only those devices.
Underlined words are defined in the KBY Lexicon. Tap or click one to see what it means.
To narrow an Intune policy to the right devices, create an assignment filter under Tenant administration then Assignment filters then Create, write a rule on a device property such as (device.deviceOwnership -eq "Corporate"), and check the matching devices with Preview devices. Then open the policy’s Properties then Assignments then Edit, select Edit filter on the group assignment and choose Include filtered devices in assignment or Exclude filtered devices in assignment. The constraint to plan around is that a filter never adds devices: it only narrows the group the policy is already assigned to, and it is evaluated when the device enrols or checks in, not when you save it.
The second point is the one to hold on to. A filter is a rule Intune runs against the properties it holds for each enrolled device, such as its name, model, manufacturer, ownership or Windows edition. The group decides who is in scope; the filter decides which of their devices actually get the policy. This guide explains how that evaluation works, how Intune settles conflicts when a device is caught by several assignments, and how to prove the result on a device. You then build a filter in a lab, watch it match, flip it from Include to Exclude, and take it apart again cleanly.
#What you’ll learn here
- Explain the difference between the group on an assignment and the assignment filter attached to it.
- Write a filter rule on Windows device properties in the rule builder or the rule syntax editor.
- Predict whether a device gets a policy from the filter mode and the match result.
- Work out the outcome when one device is caught by Include, Exclude and unfiltered assignments of the same policy.
- Read the Filter evaluation report for a device and remove a filter without leaving assignments broken.
#What you need for the lab
- A lab or test Microsoft Intune tenant, or a test group in a tenant where you are allowed to practise.
- One enrolled Windows device whose device name starts with
LAB-, and ideally a second enrolled device whose name doesn’t. - A test Entra ID device group containing those devices and nothing else.
- An existing Windows configuration profile in the lab, such as a Settings catalog profile, whose settings are harmless if they apply or don’t.
- An account that can manage filters and assignments. Microsoft’s filter guide signs in as an Intune administrator; for least privilege, the built-in Policy and Profile Manager role includes the Filters create, read, update and delete permissions.
#How Intune decides whether a filtered device gets a policy
#The group sets scope, the filter narrows it
Every Intune assignment starts with a group: a user group, a device group, or one of the virtual groups All users and All devices. Group membership lives in Microsoft Entra ID, and a dynamic group can take time to process before a new device appears in it. An assignment filter works differently. It is a reusable rule stored in Intune, and Intune evaluates it against the device’s own properties when the device enrols, when it checks in, and at other times a policy is evaluated, such as a compliance check. There is no membership to wait for, which is why Microsoft recommends filters over dynamic device groups when the group would only be used by Intune and the rule is a simple device property like OS, manufacturer, model, ownership or category.
A filter belongs to one platform, chosen when you create it, and only filters for the policy’s platform are offered when you attach one. A tenant can hold up to 200 filters, and each filter is limited to 3,072 characters. For enrolled devices, filters work with apps, compliance policies, configuration profiles and most endpoint security policies, but not everywhere: Microsoft’s supported-workloads list excludes, among others, Feature updates for Windows, PowerShell scripts for Windows, policy sets and Windows custom compliance policies. Check that list before you design a rollout around a filter.

#Include and Exclude in one table
Each assignment can carry one filter in one of two modes, or no filter at all. The mode and the match result combine like this:
| Filter mode | Device matches the rule | Result |
|---|---|---|
| Include | Yes | Policy or app applies |
| Include | No | Doesn’t apply |
| Exclude | Yes | Doesn’t apply |
| Exclude | No | Policy or app applies |
The trap in the last row is easy to miss. An Exclude filter applies the policy to every device in the group that doesn’t match, including devices whose property is still empty. Microsoft describes exactly this with device category: a new device checks in before the user has chosen a category, the filter sees a null value, and an app installs that the filter was meant to hold back. The app isn’t removed automatically when the category arrives at the next check-in.
#When one device is caught by several assignments
A device can sit in several groups that are all assigned the same policy, each with a different filter. Intune doesn’t let you assign the same group twice to one policy, but overlap through different groups is common. For managed devices, the documented precedence is that Exclude mode wins over no filter and over Include, and no filter wins over Include. Several filters in the same mode are combined with OR logic, so a device only has to match one of them. The flowchart below follows that order for one device and one policy.
Rendering diagram...
Apps add one step before this. Intune first settles the assignment intent (Required, Available or Uninstall), and only the filters on the winning intent are evaluated. If a device is targeted as both Available and Required, it gets a merged intent and both filters are evaluated with the same precedence.
#A worked example: corporate laptops only
Suppose a Windows device restriction profile is assigned to a user group, Finance staff. Some of those staff have also enrolled personal Windows devices. Assigning to the users is right, because the policy follows the person, but the profile should only land on the laptops the organisation owns. Microsoft’s own assignment guidance covers this case: assign to the user group, then use a filter to include or exclude the devices of those users. Mixing a user-group assignment with an excluded device group isn’t supported, because exclusion membership isn’t instant and devices can receive policies they shouldn’t.
The filter for this, on the Windows 10 and later platform, is one line in the rule syntax editor:
1(device.deviceOwnership -eq "Corporate") and (device.operatingSystemSKU -in ["Enterprise", "Education"])The first expression uses the ownership value Intune holds for the device, which is Personal, Corporate or unknown. The second uses the Windows edition. The Intune admin center doesn’t show SKU names, so the values come from Microsoft’s supported-values table, where Enterprise is Windows 10/11 Enterprise and Education is Windows 10/11 Education. Properties, operators and values are case-insensitive, and nested parentheses are allowed, although they switch off the basic rule builder. Before attaching it, Preview devices lists the enrolled devices that match. If a device you know to be personal appears in that list, the ownership value Intune holds for it is wrong, and that is worth fixing before the filter goes anywhere near an assignment.
To check the edition on a single Windows device, Microsoft gives this read-only Windows PowerShell command, which returns the SKU number you can look up in the same table (4 for Enterprise, 121 for Education):
1Get-WmiObject -Class Win32_OperatingSystem | select operatingsystemSKUOn the assignment, the filter goes in Include mode. Corporate Enterprise and Education laptops of Finance users get the profile; personal devices and any other edition don’t. Notice what the filter can’t do: a corporate laptop belonging to someone outside Finance never gets the profile, because it was never in the assigned group.
#Try it: a name-based filter on a lab group
Objective: prove that a filter narrows an existing assignment, and that switching its mode reverses which devices are targeted. Safe setup: the test device group from the prerequisites and a profile whose settings are harmless either way. Don’t attach a lab filter to any assignment that reaches real users.
- In the Microsoft Intune admin center, go to Tenant administration then Assignment filters then Create and choose Managed devices.
- In Basics, name it
LAB - Windows devices named LAB-, add a description, and set Platform to Windows 10 and later. Select Next. - In Rules, build the expression with the Device Name property (
deviceName), the StartsWith operator and the valueLAB-, then Add expression. The rule syntax should read(device.deviceName -startsWith "LAB-"). - Select Preview devices. Expected evidence: your
LAB-device is listed and the other test device isn’t. Stop if any device outside the lab appears; change the rule’s value until only lab devices match. - Select Next, skip scope tags unless your lab uses them, and select Create on Review + create.
- Open the lab configuration profile, go to Properties then Assignments then Edit, and confirm it is assigned only to the test device group. Select Edit filter, choose Include filtered devices in assignment, pick the LAB filter, then Select and Review + save then Save.
- Sync both devices so the filter is evaluated now rather than at the next scheduled check-in: in Devices then All devices, open each device and select Sync, then Yes. That action needs Help Desk Operator, School Administrator, Endpoint Security Manager or a custom role with Remote tasks/Sync devices. On the device itself, Settings then Accounts then Access work or school, your work account, Info, then Sync, does the same.
- Wait, then open Devices then All devices, select the
LAB-device and open Filter evaluation. Results can take up to 30 minutes to appear after evaluation. - Back on the assignment, use Edit filter again, change to Exclude filtered devices in assignment with the same filter, save, and sync both devices again.
Following along? Tap a step’s number to tick it off.
Pass condition: after step 7, the LAB- device shows the profile’s filter with result Match in Include mode, and the other device shows No match. After step 9 the targeting reverses: the LAB- device still matches, but in Exclude mode, so the profile is no longer targeted at it, while the other device is now targeted. If both devices give the same result, recheck the device names Intune holds for them, because the rule reads the Intune device name property, not whatever is on the sticker.
Cleanup: set the assignment back to Do not apply a filter, or remove the lab assignment, then delete the filter from Tenant administration then Assignment filters with the … menu. Intune refuses to delete a filter still attached to an assignment, with the message Unable to delete assignment filter – An assignment filter is associated with existing assignments, so the order matters. Changing a filter only changes targeting; whether a Windows setting already applied is removed when the device drops out of scope depends on the configuration service provider behind it, because some remove the setting and some keep it. That is why the lab uses a profile you don’t mind being left behind.

#Checking your work in the Filter evaluation report
The Filter evaluation page on a device lists each app or policy with a filter that was evaluated for it, when the evaluation ran, the result (Match or No match), the mode, the filter’s name and rules, and the device properties that were read, such as deviceName. Read it in that order: was it evaluated, when, with which mode, and what did the property hold at the time?
One detail catches people out. The filter information section shows the filter as it is configured now, not as it was when the device was evaluated. If you edited the rule after the last check-in, the report can show the new rule next to an old result. Compare the evaluation time with the filter’s last modified time before drawing a conclusion. Evaluation results are kept for 30 days; after that the report says We were not able to retrieve any filter evaluation results.
For apps, the app’s Device install status report has a Filter column with the filters evaluated per device. Available assignments don’t appear there: use the device’s Filter evaluation page instead, after the user has opened the app list in Company Portal. A result of Not evaluated can mean the device has a conflicting assignment for the same policy, which sends you back to the precedence rules above. Filter evaluation reports don’t show Conditional Access results; those are in the Microsoft Entra sign-in logs.
#What goes wrong with assignment filters
- Expecting a filter to add devices. A device outside the assigned group is never evaluated. If the right devices are missing, check the group first.
- Using Exclude mode on a property that is empty at enrolment, such as device category, so new devices receive what the filter was meant to keep from them.
- Writing the full model string for older iPad Pro models, whose names contain a double prime symbol. Microsoft advises partial operators such as
-containsfor these. - Building new rules on
osVersion. It is deprecated for managed devices; useoperatingSystemVersion, which supports-gt,-ge,-ltand-lecomparisons. - Reading the report too early. Allow up to 30 minutes after evaluation before deciding a filter didn’t run.
- Excluding a device group from an assignment made to a user group. That combination isn’t supported; use a filter on the user assignment instead.
- Attaching a filter to a workload that doesn’t support filters, such as Feature updates for Windows or PowerShell scripts, and assuming it worked.
#Worth remembering
- The group decides scope; the filter only narrows it at enrolment and check-in.
- Include applies to matches; Exclude applies to everything that doesn’t match, empty values included.
- When assignments overlap, Exclude beats no filter, and no filter beats Include. Same-mode filters combine with OR.
- Preview devices before you attach a filter, and the Filter evaluation report after.
- Detach a filter from its assignments before you delete it.
#Using assignment filters on production policies
In production, treat a filter change as a targeting change to every policy that uses it. Before editing a shared filter, open it under Tenant administration then Assignment filters and read the Associated Assignments tab, which lists every app and policy using it, the groups and the mode. Preview the new rule against real devices, then sync a small set of known devices and read their Filter evaluation pages before relying on the rest of the estate to pick it up at the normal check-in interval, which for Windows settles at around every 8 hours.
Rolling back targeting means restoring the previous rule or mode, which is why it pays to copy the rule syntax into your change record before you edit it. Rolling back a setting is a separate question, answered per setting by its configuration service provider. Escalate rather than improvise if a filter on a compliance policy starts excluding devices you didn’t expect, because compliance results feed access decisions outside Intune. For the wider habit of following a policy from assignment to the device, the guide to tracing an endpoint management problem with Microsoft Intune walks through it. Filters are a natural fit for staged rollouts such as rolling out Endpoint Privilege Management to a pilot first. And because filters only evaluate when devices check in, a list of Intune devices that haven’t synced recently tells you which ones are still running on the old targeting.
About this page
Credited to
Dates
Published
Sources
Corrections
No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.
Recommended reading
More from KBY that goes with this article.
Related articles
Endpoint and Device Management
Tracing an Endpoint and Device Management Problem with Microsoft Intune
Learn how Microsoft Intune delivers policy to devices, how to prove it with evidence, and how to run and reverse a safe, small lab exercise.
ReadEnterprise IT Management
Part 4: Configure the Intune Enrollment Status Page for Autopilot: Blocking Apps and Timeout
A custom ESP profile on the Autopilot device group, a short Win32 blocking list, quality updates on, and a 90-minute time-out chosen for a reason.
ReadSecurity & Operations
Audit and Tighten Microsoft Defender Antivirus Exclusions Across Intune, Group Policy and Local Lists
Find every Defender Antivirus exclusion, replace the risky broad ones with narrow entries, remove them where they were set, and stop local additions coming back.
ReadDiscover more
Graduate Learning
- TutorialCollecting Diagnostics from a Windows Device in Intune and Reading What Comes Back
- TutorialTracing an Endpoint and Device Management Problem with Microsoft Intune
- TutorialRolling Out Intune Endpoint Privilege Management Safely
- TutorialResolving Hybrid DNS Failures for Entra ID Hybrid-Joined Devices
Ops Playbook
- PlaybookInstall the Configuration Manager Client During Windows Autopilot With Intune Co-Management Settings
- PlaybookMigrate Group Policy to Intune With Group Policy Analytics Before Moving Autopilot to Entra Join
- PlaybookSet Up Windows Autopilot Device Preparation With Enrollment Time Grouping in Intune
- PlaybookConfigure the Autopilot Enrollment Status Page to Block Desktop Use Until Required Apps Install
Lexicon Definitions
Was this useful?
Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.
Build practical engineering skills.
Receive new lessons, learning paths, practical exercises and early-career guidance.

Comments
Add a thoughtful note on Narrowing an Intune Policy to the Right Devices with an Assignment Filter. Comments are checked for spam and held for moderation before appearing.