There may be some cases where you would like to filter the Azure AD records for Users and Groups. Some example cases can be listed as follows:
You have a large User database but actually, you don’t need all of them.
You don’t want to synchronize inactive users.
You are using your user AD for multiple departments or countries and you would like to specify which of them needs to be synchronized.
There are 4 types of groups and you are interested in only the ones for Office 365.
… you may have many more reasons to filter the data from your Azure AD.
...
Now, you have the chance to add a filter for your Users 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.
Description | Filter |
---|---|
Import only the active users. | accountEnabled eq true |
Import the users based in London city. | city eq 'London' |
Import users in a country. | country eq 'Ecuador' |
Import users of two countries. | country eq 'Ecuador' or country eq 'India' |
Import users of multiple countries. | country in ('Ecuador', 'India', 'Germany') |
Import users which are having userType as Member | userType eq 'Member' |
Import only Engineering department | department eq 'Engineering' |
Import users having the usage location as Japan or Great Britain. | usageLocation in ('JP','GB') |
Import only Microsoft 365 groups (aka unified groups) | groupTypes/any(c:c+eq+'Unified') |
Import the groups having a name starting with “team”. | startswith(displayName, 'team) |
Note: When using the in operator, the request is limited to 15 expressions in the filter clause. More information.
...