How to filter in or out users from the People Directory?

How to filter in or out users from the People Directory?

Purpose of this article

The People Directory queries the SharePoint Online People Search. By default all Azure AD users will appear in the SharePoint Online People Search and therefore also in the People Directory. Azure AD and thus the SharePoint user profiles may contain users that you don't want to show in your People Directory, such as service accounts or shared mailboxes. This article describes how to optimize your People Directory by only showing relevant users.

Preparation steps:
  • Determine which users you want to include or exclude.
  • Try to find a dimension or property that makes it easy to filter these users.
  • Tip: try to clean up users in Azure AD as this will give you a solid base at the source.
When syncing your on-premise Active Directory with the Azure AD, you can exclude AD users from the SharePoint Online People Search, without excluding them from the Azure AD, by setting the AD user property msExchHideFromAddressLists to True or Yes. There are some catches and limitations. Please read this article for more information.

Define filters in People Directory

When you need more control on which users to display in your People Directory, you can define filters in the People Directory widget. Navigate to the CMS > Organization Settings > Widgets > People Directory and open the Filter tab.


This filter will only show users that belong to a certain email domain. However, within Sharepoint Search we can't use an 'ends with' filter. So each filter is a 'contains' filter. We added a 'doesn't contain' filter so that you can still exclude domains you don't want to show. The 'doesn't contain' filter places a minus in front of the domain you want to exclude. 

E.g.: filling out '' ensures that this domain is included, while '' ensures that this domain is excluded. 

Excluded users

Using this filter you can filter out unique users. Add the email addresses of users you want to filter out. This is a practical method if you just want to exclude a few users.

Use custom refiners

By default the standard definers apply (job titles, departments, office locations). When selecting 'use custom refiners', you can add your own definers. You do so by filling out the 'refiner' field.  

Extra queries

Using extra queries you can filter on specific properties of your users. It works dynamically and can be used in different scenario's. For example, you can use the extra queries to only display users that are explicitly marked to be displayed, or only display employees that work in a specific country. Schools can use the extra queries to make a People Directory specifically for employees or students.

Add a new query or edit an existing one and make the following choices.
  1. Choose a property of the user to filter on. Select or fill in the name of the SharePoint managed property you want to filter on. You can select one of the existing managed properties from the list, or type the name of a custom managed property.
  2. Choose the operator (Equal to, Not equal to, etc.).
  3. Type the value for the query.
The example below will result in displaying all users that have the property 'Show In People Directory' checked in their SharePoint user profile.

Add an extra query to the People Directory widget
To achieve this, you first need to add a custom property to the SharePoint user profiles and map a SharePoint manaqed property (in this example 'SynigoShowInPeopleDirectory').

Adding extra fields

You can extra fields to the People Directory widget to refine your search. Follow the steps below:
  1. Go to the People Directory Widget in CMS
  2. Go to the tab 'Filter' 
  3. Go to 'also search on these fields' and fill in the fields you want to use. Choose on of the defaults or add your own by clicking on the + (this last one is not live yet). The defaults are:
    1. PrefferedName
    2. JobTitle
    3. WorkEmail
    4. AboutMe
    5. Responsibility
    6. Interests
    7. Department
    8. Schools
    9. OfficeNumber
    10. BaseOfficeLocation
    11. PastProjects
    12. Skills
    13. MobilePhone
    14. WorkPhone

Adding custom filters

You can add custom dynamic filters to the People Directory. These filters will appear here:

To add the filters, do the following: 
  1. Go to the People Directory widget in CMS
  2. Go to the tab 'filter'
  3. Check the 'use custom filters' checkbox
  4. Go to 'filters' and click 'add refiner'
  5. Fill in the title of your refiner
  6. For the field 'refiner', you'll have to use a refinable string you've made 
To add this refinable string, do the following: 
  1. Go to the SharePoint Admin Center
  2. Go to 'manage search schema'
  3. You'll see 'managed property' with a search box:

  4. Within the search box, search for 'refinablestring'
  5. You'll now see all the refinable strings you have available
  6. Select one of the strings and go to 'mapping to crawled property'
  7. Select 'add mapping':

  8. Add a mapping
  9. Within the CMS add the name of your refinable string to the refiner field, e.g.: 'RefinableString00':

    • Related Articles

    • Activate the new People Directory in Pulse

      On July 15th, 2018 we've released the new People Directory in Synigo Pulse. In new Pulse environments activated after July 15th, 2018, the People Directory is activated by default. In existing Pulse environments, activated before July 15th, 2018, the ...
    • How to filter in the People Directory?

      The People Directory is your organization's Face book (aka smoelenboek). It gives a nice overview of all your colleagues and/or other users in your organization. You can search for people based on their profile.  Filter in People Directory Go to the ...
    • Add a view to the People Directory

      You can add custom views to the People Directory. This enables users to quickly open profiles that match a certain condition. E.g. you can add a view that shows all students or all field workers. Requirements You'll need a SharePoint managed property ...
    • The People Directory has new looks

      Purpose of this article We've changed the look of our People Directory so it shows you more information about your colleagues. You can now see their Teams status, their skills and other profile information. You can also see which events your ...
    • Search People Directory: which fields are used?

      Purpose of this article When you use the Search People Directory widget to search through the People Directory, there are certain fields within SharePoint that are used. It's useful to know which fields are used, so this article lists those fields.  ...