Filter
There may be some cases where you would like to filter the Entra ID (Azure AD) records for Users, Groups, or Devices. Some example cases can be listed as follows:
You have an extensive User database, but actually, you don’t need all of them.
You don’t want to synchronize inactive users.
You are using your user directory for multiple departments or countries and you would like to specify which of them needs to be synchronized.
There are four types of groups, and you are interested in only the ones for Office 365.
You would like to import only users who own a specific Microsoft License.
… you may have many more reasons to filter the data from your Entra ID (Azure AD).
Now you can add filters for Users, Groups, and Devices under the Admin tab.
The filters need to be formatted according to Microsoft Graph API requirements. You may find some examples below. Please refer to Microsoft Graph API documentation for more details.
Type | Description | Filter |
|---|---|---|
User Filter | Import only the active users. |
|
User Filter | Import the users based in London. |
|
User Filter | Import users in a country. |
|
User Filter | Import users from two countries. |
|
User Filter | Import users from multiple countries. |
|
User Filter | Import users who have userType as Member |
|
User Filter | Import active users who have userType as Member |
|
User Filter | Import only the Engineering department |
|
User Filter | Filter the users who are in the Engineering department and also the User Type is 'Member” |
|
User Filter | Import users with a usage location of Japan or Great Britain. |
|
User Filter | Import only the users having a specific license assigned. Here, skuId is the license identifier. |
|
Group Filter | Import only Microsoft 365 groups (aka unified groups) |
|
Group Filter | Import the groups whose names start with “team”. |
|
Device Filter | Import the devices whose names start with “a”. |
|
Device Filter | Import the devices having a specific Operating System. i.e. Android |
|
Device Filter | Import the devices having a specific Operating System. i.e. Android |
|
Notes:
When using the in operator, the filter clause is limited to 15 expressions. More information.
Microsoft Graph API does not allow filtering the Licenses themselves. But you can filter users by license, as shown in the table above.
If you get a warning message about the groups filter, it may be a permission issue. Please review the note regarding the permission scopes on the source configuration page.
Each filter works for the specified data set. For example:
When a filter is applied for Users → Filtered Users are imported.
When a filter is applied for Groups → Filtered Groups are imported.
When a filter is applied for Devices → Filtered Devices are imported.
It is now also possible to apply a filter to import the intersection of Filtered Users and Filtered Groups, as shown in the diagram below. Please review the documentation below: Users in specific Groups (Experimental)
Important Note: The Microsoft Graph API has limitations on filter support. For example, not all properties support the filter feature. Since we are using the API with the expand option, advanced filtering is not supported.
Only the ones marked as follows will work.
The $filter operator works by default for that property.
Please refer to the Microsoft documentation Legend for more details
https://learn.microsoft.com/en-us/graph/aad-advanced-queries?tabs=http#legend
This means functions like “endsWith” are not supported. In summary, the following examples will not work with the filters due to the limitations of the Microsoft Graph API. More information.
Description | Filter |
|---|---|
Only the users having the organization's email address. |
|
Users having an email address. |
|
Another way to filter users by email address. |
|
Import only if the users have a company name that is not Microsoft. |
|
Do not import users starting with 'Conf'. |
|
Do not import the users having user type as Guest |
|
Import the users in Latium Office location. |
|
Only the users who are members of a specific group. |
|
Only the Devices having a specific extension attribute value |
|