20 thoughts on “Hide User from Microsoft 365 People Search (for real)

  1. Pingback: How to remove service accounts from people search in SharePoint or Office 365 (Classic search) ⋆ SharePoint Vlad

  2. Pingback: Microsoft Search People Custom User Profile Property ⋆ SharePoint Vlad

  3. Kasper Larsen

    Thanks for sharing! I have a hard time understanding why the People vertical at the organization level can’t be tailored to the organization needs, but I guess we just have to wait another year. As far as I know it isn’t even on the road map yet 🤨

    Reply
  4. Yves

    How can a hide a admin user without license from the teams addressbook? As this is a cloud only user, we do not have any hide from GAL or ShowInAddressList feature.

    Reply
  5. Mark Gort

    We tried to change this setting ShowInAddressList in hybrid AD sync scenario. But it looks like impossible to set this value.

    Set-AzureADUser -ObjectId $user.ObjectId -ShowInAddressList $false (feedback: Message: Unable to update the specified properties for on-premises mastered Directory Sync objects or objects currently undergoing migration.

    Set-ADUser (not possible to edit this attribute). So then try to change this attribute by making use of Active Directory Users and Computers. Client is throwing and error on the screen: Operation failed. Error code: 0x20b5 the name reference is invalid.

    Anyone knowing an proper solution to reach this solution? Lots of thanks 🙂

    Reply
    1. Vladilen Post author

      Hi Mark,

      I was able to validate solution only with cloud-born accounts.
      I will try AD sync scenario, but at the moment I do not have a proved answer.

      I’d guess this property should be synced from some on-prem property, so the question is from what on-prem property.

      Reply
      1. Kalervo Jankko

        Have you found the right on-prem property to validate that this works with AD synced accounts also?

  6. AZ

    ShowInAddressList set to false does not seem work to hide guest users in the teams search. Not sure what else I could do

    Reply
    1. Shey

      has any one found answer to the issue as ShowInAddressList set to false does not seem work to hide guest users in the teams search.

      Reply
  7. Cyd

    Hi Vladilen,

    Thank you for your guides and they are fantastic. I have followed the steps from the PowerShell and I am able to hide two test accounts. I did that this morning and after 1hr or so, I wont be able to see them on Outlook and Teams which is fantastic but for some reason when I checked them again in the afternoon, they appeared again in Outlook and Teams. Any idea? These accounts are cloud-born accounts. TIA

    Reply
  8. PS

    Trying this today and I seem unable to set the parameter ‘ShowInAddressList’. It just says the parameter cannot be found. I also cannot use -Select from the first step.

    Have these features been removed?

    Reply
  9. Wizmatic

    Yep, the ShowInAddressList not longer shows. Seems like it can’t be updated from Powershell anymore.

    Update-AzADUser -Upn xxxxx -ShowInAddressList:$false this command worked but when I do
    Get-AzADUser -UserPrincipalName xxxxx -Select AccountEnabled, ShowInAddressList -AppendSelected it does not show the field ShowInAddressLis.

    Reply
    1. Vladilen Post author

      thanks for the heads-up…
      maybe Microsoft is working on it… hopefully they’ll fix inconsistency and provide us with a working solution

      Update:
      I have just tested my two tenants – all works the same way as before – I can change ShowInAddressList property and changed values are displayed correctly.

      This property should be synced to “Show in Global Address List” under m365 Admin Center and “Hide from global address list (GAL)” under Exchange Admin Center,
      can you validate?

      Reply
      1. Wizmatic

        When I search in Teams and portal.office.com, the accounts do not show. So it seems to have worked. However, I’m trying to use the Webpart ‘People directory’ in SharePoint, but the accounts show up there when I search. Seems to be some disconnect. I also added the {searchboxquery} -“SPS-HideFromAddressLists”:1 which works for the classic search but not the modern one. Thanks for checking. Sincerely appreciated.

Leave a Reply

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