Users excluded from address list are still appearing in SharePoint Online modern People Search but not Delve

Matthew Lamb 1 Reputation point
2022-02-07T10:04:40.703+00:00

I have set a user account to be excluded from address lists using the on-prem AD attribute msexchHideFromAddressLists, also setting the mailnickname attribute to ensure things get replicated correctly. This is working and I can see that the SharePoint user profile has got SPS-HideFromAddressLists set to true.

This user does now not appear in Delve when searching by the username, which is great.

However, the user does still appear when searching in the SharePoint modern search, under the People tab (/_layouts/15/sharepoint.aspx). My understanding is that this should respect the SPS-HideFromAddressLists property the same way Delve does. There's no way to customise the query as far as I can see.

Is there some additional caching that happens, something else that I need to set, or should the People search be returning the same result as Delve?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,628 questions
{count} votes

1 answer

Sort by: Most helpful
  1. JoyZ 18,041 Reputation points
    2022-02-08T06:25:09.21+00:00

    @Matthew Lamb

    From this article, SharePoint Online People search results means the classic people search result page with the suffix "peopleresults.aspx", not the modern people search page.
    172030-image.png
    If you have an Enterprise Search Center, this is the search results page for the People search vertical.

    172103-image.png

    Edit the classic people search result page and Change Query Text from {searchboxquery} to {searchboxquery} -"SPS-HideFromAddressLists":1 to compare the result.

    172085-image.png

    -----------------------------------------------Update Answer-----------------------------------------------

    Per my test,if the msExchHideFromAddressLists property has been set to True, then sync to azure ad, we will not able to find this user again in modern search and delve:
    173300-image.png

    173299-image.png

    173345-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.