Enable scoped directory search
Microsoft Teams scoped directory search allows organizations to create virtual boundaries that control how users can find and communicate with other users in their organization.
Microsoft Teams lets organizations provide custom views of the directory to their users. Microsoft Teams uses Microsoft Purview Information Barrier policies to support these custom views. Enabling scope directory search is a prerequisite to use information barriers.
Once the policies are enabled, the results returned by searches for other users will be scoped according to the configured policies. Users won't be able to search or discover any teams when scoped search is in effect. But existing members in those teams can add users, as allowed by active Information Barrier policies.
When should you use scoped directory searches?
You may use the scoped directory search, when:
Your organization has multiple companies within its tenant that you want to keep separate.
Your school wants to limit chats between faculty and students.
For more information, see Limit who users can see when searching the directory in Teams
Turn on scoped directory search
Sign in to the Teams Admin center.
Navigate to Teams > Teams settings.
Scroll down to Search by name and turn the slider behind Scope directory search using an Exchange address book policy to On.
This change can take a few hours to replicate.