You rarely need your whole directory in Assets. Maybe you don't want inactive users, only one country or department matters, or you only care about Microsoft 365 groups. Microsoft Entra ID Importer for Assets gives you two kinds of filter for Users, Groups and Devices, plus a few settings that control how users and groups work together.
Two kinds of filter
| Source filters | Admin filters | |
|---|---|---|
| Where | Source tab | Admin › Connection Settings |
| Applies to | Users, Groups and Devices | Users, Groups and Devices |
| When it runs | Sent to Entra ID with the Microsoft Graph request | Applied by the app after the data is read |
| Syntax | Microsoft Graph $filter | The app's own format |
| Best for | Reading less data in large tenants | Conditions Graph can't handle, such as "ends with" or "is not empty" |
You can use both. The Admin filters only see the records that the Source filters let through.
Note: Only Users, Groups and Devices can be filtered. Other object types, such as Access Packages, Catalogs, Conditional Access Policies, Enterprise Applications, Application Secrets and Certificates, and Agents, can't be filtered.
Source filters
Source filters use Microsoft Graph filter syntax. Each filter applies to its own data set: the Users filter decides which users are imported, the Groups filter which groups, and the Devices filter which devices.
Examples
| Filter | Imports |
|---|---|
accountEnabled eq true | Only active users |
city eq 'London' | Users based in London |
country in ('Ecuador', 'India', 'Germany') | Users from several countries |
accountEnabled eq true and userType eq 'Member' | Active members, no guests |
department eq 'Engineering' | One department |
usageLocation in ('JP','GB') | Users with a usage location of Japan or Great Britain |
groupTypes/any(c:c+eq+'Unified') | Only Microsoft 365 (unified) groups |
startswith(displayName, 'team') | Groups whose names start with "team" |
operatingSystem eq 'Android' | Android devices |
operatingSystemVersion eq '15' | Devices on a specific OS version |
To import only users with a specific licence, filter on the licence's skuId:
assignedLicenses/any(s:s/skuId eq c42b9cae-ea4f-4ab7-9717-81576235ccac)
You can filter users by licence like this, but you can't filter the Licences object type itself.
What Microsoft Graph won't accept
The app reads data with Graph's expand option, so Graph's advanced queries are not available. Only properties where $filter works by default can be used. The Microsoft Graph advanced query legend shows which ones those are.
In practice, these do not work as Source filters:
endsWith(mail,'@organization.com')NOT(mail eq null)ormail ne nullNOT startsWith(displayName, 'Conf')not(userType in ('Guest'))officeLocation eq 'Latium Office'extensionAttribute1 eq 'BYOD-Device'on devices
Most of these can be done with an Admin filter instead.
Also keep in mind:
- The
inoperator takes at most 15 values. - A warning about the Groups filter is usually a permission problem. Check the Graph permissions on your app registration.
Admin filters
Admin filters are applied by the app itself, so they support conditions that Graph doesn't.
Format
A filter is one or more conditions in the form field operator 'value':
displayName startsWith 'John'
Combine conditions with and (all must be true) or or (at least one must be true):
mail endsWith '@example.com' and employeeId isNotEmpty
Operators
| Operator | Meaning | Example |
|---|---|---|
eq / ne | Equal / not equal | country eq 'US' |
gt / lt / ge / le | Greater / less than (or equal) | createdDateTime gt '2024-01-01T00:00:00Z' |
contains / notContains | Text contains / doesn't contain | displayName contains 'Admin' |
startsWith / notStartsWith | Text starts / doesn't start with | displayName notStartsWith 'Conf' |
endsWith / notEndsWith | Text ends / doesn't end with | mail endsWith '@example.com' |
isEmpty / isNotEmpty | Field is empty / has a value | employeeId isNotEmpty |
Rules
- Field names and values are case-sensitive. Match the case used in Entra ID.
- Put values in single (
') or double (") quotes. - You can't mix
andandorin one filter. - An empty filter imports everything.
Filter groups by owner
To import groups by owner, filter on owners_id. Use contains rather than eq, so groups with more than one owner also match:
owners_id contains '<owner object ID>'
Users are linked to groups that match by owner, too.
Import only users in specific groups
Merge User and Group Filters
Turn on Merge User and Group Filters in Admin › Connection Settings to import only users who are members of specific groups. By default, those are the groups your Groups Filter matches. The users are still subject to your other filters, so group filters and user filters work together.
Note: With Merge on, only users who belong to a group are imported, even if no filter is defined.
Merge only applies to full imports. It doesn't work in a test import, so check the result with a full import.
Users Scope Groups Filter (beta)
Beta: The Users Scope Groups Filter is a beta feature, available from version 6.35.0.
Without it, the Groups Filter decides two things at once: which Group objects are imported, and which users are imported. The Users Scope Groups Filter, in Admin › Connection Settings below Merge User and Group Filters, splits them:
- Groups Filter: which Group objects are imported, and which groups users are linked to.
- Users Scope Groups Filter: which users are imported. Only members of the matching groups come across.
This lets you import more groups without importing more users. For example, to import every "Team" group but only the users in "Staff" groups:
Groups Filter: displayName startsWith 'Team'
Users Scope Groups Filter: displayName startsWith 'Staff'
Users are then linked to the "Team" groups they are a direct member of. The "Staff" groups don't have to be imported as Group objects: their members are still imported, just not linked to them.
The Users Scope Groups Filter uses the Admin filter format and the same fields as the Groups Filter: displayName, classification, createdDateTime, deletedDateTime, description, expirationDateTime, id, mail, renewedDateTime, groupTypes and owners_id. Leave it empty to keep scoping users by the Groups Filter.
Good to know:
- It has no effect when Merge User and Group Filters is off or the Groups object type is disabled.
- The groups must also match the Groups filter on the Source tab (the Azure connection page).
- If it matches no groups, Merge is not applied and users are imported as if Merge were off. Other filters still apply.
- In very large tenants, the import falls back to reading at most 20 groups per user. Merge, and so this filter, is not applied then.
Skip groups without members
Turn on Skip groups without members in Admin › Connection Settings to leave out empty groups. Only users count as members, so a group whose direct members are only devices, nested groups or other objects is skipped too.
If the groups or their members can't be read from Entra ID, no groups are skipped.
Check the result
- The import logs show the number of groups before and after the app's filters, how many user and group memberships were found in each batch, and whether Merge User and Group Filters was applied.
- Reset Application clears the Users, Groups, Devices and Users Scope Groups filters.


