logo
search
Others

How to Limit SharePoint Search to Selected Hub Sites and Private Sites

Maira MehtabMaira Mehtab Oct 23, 2026 868 views

Question details

The user needs to configure a SharePoint hub search to return results from specific associated sites and only the private sites accessible to the current user, while excluding unrelated tenant sites.

Limit SharePoint Search to Selected Sites and Accessible Private Sites
Product
Microsoft SharePoint
Device & OS
not provided
Scenario
Configuring search scopes on a SharePoint Hub site to balance the global visibility of public sites with permission-trimmed access to private sites.
Observed behavior
By default, the hub search only includes sites directly associated with the hub. Unassociated private sites, even if accessible to the searching user, are excluded from the results unless the search scope is modified.
Before you start

Ensure you have SharePoint Administrator privileges and the PnP PowerShell module installed on your device to successfully modify search scope settings.

Solution 1Recommended

Change Hub Search Scope to Tenant Level via PnP PowerShell

Modify the default search scope from the current hub to the entire organization, allowing permission-trimmed access to private sites.

By default, searching a SharePoint hub only returns results from sites explicitly linked to that hub. To include unassociated private sites that the user has permission to view, you must expand the search scope to the tenant level.

You can achieve this using PnP PowerShell commands to adjust the search settings. Note that SharePoint automatically security-trims search results, meaning users will still only see private sites they have permission to access. However, this method may include other unrelated tenant sites.

1
Open PowerShell

Launch PowerShell on your computer as an administrator.

2
Connect to your SharePoint Site

Run the command: Connect-PnPOnline -Url https://tenantname.sharepoint.com/sites/sitename (replace with your actual tenant and site URL).

3
Modify the Search Scope

Execute the command: Set-PnPSearchSettings -SearchScope Tenant to change the default search scope to the entire organization.

Change Hub Search Scope to Tenant Level via PnP PowerShell
Search Scope Updated: The search results will now respect user permissions across the tenant, displaying accessible private sites alongside the hub's associated sites.
Free Microsoft Office alternative

Boost Your Productivity with WPS Office

While managing complex SharePoint permissions and search scopes requires specific Microsoft ecosystem tools, you can handle all your daily document needs using WPS Office. It provides a lightweight, comprehensive suite for creating, editing, and sharing documents effortlessly.

  1. 1. Download the Installer: Visit the official WPS Office website and click the free download button for your operating system.
  2. 2. Install the Software: Run the downloaded installer file and follow the simple on-screen instructions to complete the setup.
  3. 3. Start Creating: Open WPS Office and instantly begin editing your documents, spreadsheets, and presentations with high compatibility.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats.Lightweight installation that runs smoothly on Windows, Mac, and Linux environments.Free to use for daily document creation and editing tasks.Familiar user interface allowing for a seamless migration from Microsoft Office.
microsoft office alternative - wps office

Frequently Asked Questions

Why are my private SharePoint sites not showing up in hub search results?

By default, the search scope on a hub site is restricted to the hub level. Unassociated sites, including private team sites you have access to, are excluded from the results unless they are directly linked to the hub or the search scope is broadened.

Does changing the search scope to Tenant expose private sites to unauthorized users?

No. SharePoint search results are strictly security-trimmed. Users will only see content and sites in their search results that they have explicit permission to view, regardless of the search scope level.

What is PnP PowerShell and why do I need it for this configuration?

PnP PowerShell is a cross-platform module providing robust administrative commands for SharePoint Online. It is required here because modifying the default modern search scope behavior from 'Hub' to 'Tenant' cannot be done directly through the standard SharePoint graphical user interface.