Forum Discussion
MikeHaleLH
May 03, 2023Copper Contributor
Hide Users from Teams Directory
We have a request from our corporate leadership to hide non-primary AD accounts from Teams search. Many of us in the IT team have multiple accounts (i.e. privileged access to certain platforms, d...
gireeshda
May 16, 2024Copper Contributor
This the Microsoft documentation on 'Limit who users can see when searching the directory in Teams'
https://learn.microsoft.com/en-us/microsoftteams/teams-scoped-directory-search
To achieve the objective of hiding users (guests or unlicensed users of MS Office 365), two steps need to be performed
1. Set "ShowInAddressList" property of user in Azure Entra/AAD. Unfortunately, I do not see option to perform this in Entra Portal. Only PowerShell scripts is possible, as follows.
Set-AzureADUser -ObjectId "email address removed for privacy reasons" -ShowInAddressList $false
2. Change MS Teams setting by following the link below.
https://learn.microsoft.com/en-us/microsoftteams/teams-scoped-directory-search
To turn on search by name, on MS Teams
In the Microsoft Teams admin center, select Teams > Teams settings. Note: In case Teams Admin Centre page not loading, open in Incognito mode
Under Search by name, next to Scope directory search using an Exchange address book policy, turn the toggle On.
When Scope directory search using an Exchange address book policy is turned on, all accounts that are marked as hidden in Exchange won't show up in Teams searches.
Note (as per above MS Teams documentation):
It may take a few hours for this change to take effect.
Turning on search by name hides the Search teams box and public teams listing in Join or create a team in Teams. It will also disable joining a team by typing /join in the command box at the top of Teams.
jongraham
Jun 05, 2024Copper Contributor
We have a mailbox for users to email our help desk, but we don't use it in Teams. I need to keep it visible in Exchange/Outlook/GAL for email, but hide it from Teams. The procedure above doesn't seem to allow this, or am I not understanding correctly?
- peter-supplyJun 06, 2024Brass ContributorWe sync users from local AD. We have the msExchHideFromAddressLists set to "TRUE." We have the "Scope directory search using an Exchange Address book policy" toggled to "on." But the user accounts with no license and "hidden" from the GAL still show in Teams. Thoughts?