What if you want specific users do not appear in Microsoft 365 SharePoint, Teams or Delve search results? Examples are:
a) secondary/admin accounts
e.g. a person have several roles and several accounts under the same name, e.g.
regular user: John Smith John.Smith@contoso.com
administrative account: John Smith John.Smith.2@contoso.com
b) role or service accounts like SharePoint_Support@contoso.com
Getting multiple results for the same one person might confuse users and even lead to miscommunication and broken processes.
There is a good article by Tania Menice (Microsoft): Exclude Users From Delve and SharePoint Online People Search with the latest updates stating that currently it is not possible, but Microsoft is working on it.
Basically, the article says:
- Set the profiles AD property msExchHideFromAddressLists to True or Yes,
- Sync/wait, so finally SharePoint UPA service SPS-HideFromAddressLists property will be set (msExchHideFromAddressLists AD property is mapped to the UPA SPS-HideFromAddressLists)
- Under SharePoint classic search – update query:
{searchboxquery} to {searchboxquery} -“SPS-HideFromAddressLists”:1
It works perfect for classic search. The problem is it does not work as expected in modern Microsoft Search.
“People” vertical is not customizable so far. So we cannot change query to do the same trick. But… it seems like Microsoft is working on it so finally it should be done by ootb means.
Here is the current situation on how different services or search entry points respect SPS-HideFromAddressLists property:
Microsoft 365 Service or Search Entry point | respect SPS-HideFromAddressLists (msExchHideFromAddressLists) |
web Outlook “New message” user picker | Yes |
web Outlook “Contacts” | Yes |
Office.com “All” vertical | Yes |
Office.com “People” vertical | No |
SharePoint landing page “All” vertical | Yes |
SharePoint landing page “People” vertical | No |
Bing Work All Vertical | Yes |
Bing Work People Vertical | Yes |
So only “People” vertical in Microsoft search does not respect SPS-HideFromAddressLists (msExchHideFromAddressLists).
What about cloud-based accounts (not synchronized from local AD)?
There is a configuration setting “Show in global address list” that does the same job. It’s under Microsoft 365 admin center -> Active Users -> User – Edit -> Mail -> Show in global address list:

And another configuration settings “Hide from global address list (GAL)” under Exchange Admin Center:

(WIP)
User Account | 1 | 2 | 3 | 4 | 5 |
Enabled | Yes | No | Yes | Yes | Yes |
Licensed (E5) | No | Yes | Yes | Yes | Yes |
m365 Admin Center: Show in Global Address List | n/a | No | No | Yes | No |
Exchange Admin Center: Hide from global address list (GAL) | n/a | On | On | Off | On |
Get-AzureADUser -ObjectId … | Select -ExpandProperty ShowInAddressList | null | null | null | null | False |
SPO UPA ‘SPS-HideFromAddressLists‘ value | False | False | False | False | True |
Outlook Address List “All Users” | Shown | ||||
Office.com Search: Vertical “All” | Shown | ||||
Office.com Search: Vertical “People” | Shown | Shown | Shown | Shown | |
Bing Work Search: All/People verticals | Shown | Shown | |||
Teams Search: “All” Vertical | Shown | Shown | |||
Teams Search: “People” vertical | Shown | Shown | Shown | Shown | |
Microsoft 365 Profile card – Organization | Shown | Shown | |||
Teams Profile card – Organization | Shown | Shown | Shown | Shown | |
Teams People Picker | Shown | Shown | Shown | Shown | |
SharePoint People Picker | Shown | ||||
Outlook People Picker: | Shown |
Does it seem confused we have properties:
- “Show in Global Address List” under m365 Admin Center
- “Hide from global address list (GAL)” under Exchange Admin Center
- “ShowInAddressList” Azure AD User object property
- “SPS-HideFromAddressLists” SharePoint User Profile property
Are these properties related to each other?
(WIP) Let’s test it:
Action-Consequences (immediate reaction – minutes if not other mentioned) | “Show in Global Address List” under m365 Admin Center | “Hide from global address list (GAL)” under Exchange Admin Center | “ShowInAddressList” Azure AD User object property | “SPS-HideFromAddressLists” SharePoint User Profile property |
New user created, license assigned | Yes | Off | null | False |
Uncheck “Show in my organization address list” under Microsoft 365 admin center | No | On | after one minute: null after 24 hours: null | after one minute: False after 24 hours: False |
Set “ShowInAddressList” Azure AD User object property to “True” | Yes | Off | True | False |
Set “ShowInAddressList” Azure AD User object property to “False” | No | On | False | True |
Some findings:
- “Show in Global Address List” under m365 Admin Center and “Hide from global address list (GAL)” under Exchange Admin Center – same, i.e. if you change one – another will be updated momentarily
But both does not affect “ShowInAddressList” Azure AD User object property and “SPS-HideFromAddressLists” SharePoint User Profile property
and vise versa (???) - “SPS-HideFromAddressLists” SharePoint User Profile property is not changeable.
If you try to change the property value you’ll get an error message:
Set-PnPUserProfileProperty : Property Not Editable: This property can not be modified. - “ShowInAddressList” Azure AD User object property is editable and synchronized to “SPS-HideFromAddressLists” SharePoint User Profile property (takes minutes)
but then search crawler must pick this change up (takes hours) to hide/show the user - Results are inconsistent π
Note: Az module works fine too. I.e. Get-AzADUser instead of Get-AzureADUser and Set-AzADUser instead of Set-AzureADUser.