Start a conversation

Exclude Deleted, Disabled, or Inactive User Accounts in People Search

Overview

Users who no longer belong to the organization still appear in SharePoint Search by default or in the intranet Employee Directory. Or there might be test or service accounts which need to be in SharePoint for other applications, but they are not tied to people and can be confusing when they pop up in people searches.

This article describes the steps needed to remove / hide/ exclude unwanted results from SharePoint People Search.

 

Solution

To remove such results, the following procedure needs to be applied in online/cloud environments so only 'active' users are shown.

Please ensure you have Administrator Access/Permissions O365 suite, SharePoint Site Collection, and On-Premise Active Directory.

  • Set the msExchHideFromAddressLists property of the user that needs to be hidden from people search or Delve to True or 1. (The technical explanation of the property is mentioned at the bottom).

  • Azure Active Directory Sync should synchronize the changes to Office365 directory services.

  •  The change would eventually propagate all the way up to SharePoint Online (SPO)User Profiles.

  •  Once changes are synched to User profiles, incremental crawl should crawl the profiles that were set with SPSHideFromAddressLists property.

  • Follow the steps that will allow default 'people' search to exclude all profiles with SPS-HideFromAddressLists set:

    1. Browse to enterprise search people results from the page, example:
      https://yoursitename.sharepoint.com/sites/bonzai/search/Pages/peopleresults.aspx
    2. Edit Search Results page.
    3. Edit People Results in Web part.
    4. Change query.
    5. Change Query Text from {searchboxquery} to {searchboxquery} –“SPS-HideFromAddressLists”:1
    6. Apply changes.
    7. Check-in changes and publish the page.

You can also check these articles

Testing

To verify crawl has updated the index with the above changes, perform the steps below:

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted

Comments