Exclude Users From Delve and SharePoint Online People Search

This post has been republished via RSS; it originally appeared at: SharePoint Support Blog articles.

In support, we receive requests from time to time for information on how-to configure SharePoint People search and Delve results so that specific users do not appear in search results. Many admins want to be able to do this without having to delete or move users to a non-synced OU. The best way to accomplish this is to make the following changes: In your On-premises AD:

  1. Set the profiles AD property msExchHideFromAddressLists to True or Yes
  2. Run a Sync (DirSync etc) which will in turn be synced to SPO(If the change is made in Exchange Online, it will not be synced to SharePoint Online). Hint: You may need to add/update the “MailNickName” attribute in on-prem AD for the msExchHideFromAddressLists  to sync.
  3. msExchHideFromAddressLists AD property contents are mapped to the UPA SPS-HideFromAddressLists

Note: Changing msExchHideFromAddressLists does not remove the user from the Organization view in Delve.


Once sync completes to UPA, there will be a profile incremental crawl that needs to complete so that the index has the managed property SPS-HideFromAddressLists. Delve automatically excludes or filter all profiles that have SPS-HideFromAddressLists managed property set to true so no additional changes/configurations need to be done for Delve. However, the SharePoint people search does not exclude these profiles automatically. The following configuration steps need to be performed to exclude these profiles from appearing in the SharePoint Online People search results:

  1. Go to enterprise search people results page: https://contoso.sharepoint.com/search/Pages/peopleresults.aspx
  2. Edit Search Results page
  3. Edit People Results Web Part
  4. Change query
  5. Change Query Text from {searchboxquery} to {searchboxquery} -"SPS-HideFromAddressLists":1

NOTE: because of the dash in the managed property name, the managed property SPS-HideFromAddressLists needs to be enclosed in "" (make sure that you are using the correct "" and - otherwise your search results will be incorrect)

  1. Apply changes to the Search results Web Part
  2. Check-in changes to the Page
  3. Publish changes

NOTE: If you have any customization that use the Local People Results, similar changes needs to be implemented to automatically exclude all profiles configured -"SPS-HideFromAddressLists":1 to be excluded from there as well.


Remove the user from the Organization view in Delve:

  1. Find the user that you no longer want to show up in the Organization view in on-premises AD.
  2. Remove the manager value for the user. You will also need to update or change another synced field at the same time for the null value to be successfully synced. Examples of fields used include:  'MailNickName', 'Birthday', etc.   
  3. Run a Sync.


Known limitations:

  1. This process does not work for cloud accounts.
  2. If you want the user to be returned in search you will need to change the msExchHideFromAddressLists value to false or no. If the value is only set to null in most cases it will not be synced down to SharePoint Profile and will continue to be removed from search.
  3. Changing msExchHideFromAddressLists does not remove the user from the Organization view in Delve.


Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.