Forum Discussion

grant_jenkins's avatar
grant_jenkins
Steel Contributor
May 11, 2025
Solved

Modern Search - Scope outside current Site or Hub

I wanted to confirm whether or not we can configure a SharePoint site so it can search outside the default scope.

For a single site we can only search within that site, for a Hub site we can only search the Hub site and associated sites. Otherwise, it's a global search.

However, for our scenario (we have many like this) I also want to include a couple of additional sites as part of my search scope. So, the Hub and associated sites + a couple of other selected sites outside that.

I'm not looking to use the Search Graph API connectors for this (we have issues with how these work). I'm also not looking to use any third-party solutions such as PnP, etc.

Any ideas on whether this is possible and if so, how?

If not possible - then that's a major gap in SharePoint search as we have many scenarios across our business where we've had these requirements, but not yet been able to solve it.

  • Hi, unfortunately, there is no “modern” out-of-the-box way to extend the standard search box beyond a site or hub. However, you can:

    -Classic Search Center + Result Source: create a classic Search Center and define a Result Source with path: that includes hubs + extra sites.

    -Custom SPFx Search Web Part: develop a web part that performs a REST/CSOM query with path: filter on the URLs you need.

    Otherwise, you need an external solution (Graph connector, PnP or similar).

6 Replies

  • Rachel_Davis's avatar
    Rachel_Davis
    Steel Contributor

    Well, another option is to use SharePoint Home/Start. Go to SharePoint in the waffle menu or the home icon in the left app bar. From there you can search EVERYTHING you have access to see - SharePoint, Teams, OneDrive, etc. 

  • micheleariis's avatar
    micheleariis
    Steel Contributor

    Yes, unfortunately at the moment the only “modern” way is to use solutions like PnP Modern Search Web Parts. I also suggest you send feedback to Microsoft (Admin Center - Feedback) to ask for custom scopes. Hopefully they will integrate it soon 🙂

  • micheleariis's avatar
    micheleariis
    Steel Contributor

    Hi, unfortunately, there is no “modern” out-of-the-box way to extend the standard search box beyond a site or hub. However, you can:

    -Classic Search Center + Result Source: create a classic Search Center and define a Result Source with path: that includes hubs + extra sites.

    -Custom SPFx Search Web Part: develop a web part that performs a REST/CSOM query with path: filter on the URLs you need.

    Otherwise, you need an external solution (Graph connector, PnP or similar).

    • grant_jenkins's avatar
      grant_jenkins
      Steel Contributor

      micheleariis​  Thanks - you provided the answer I was expecting but not hoping for 😉.

      We really want to continue using the Modern unified search experience but may need to deviate to other solutions. I still see this as a major gap with Microsoft Search. We really don't want to go down the classic search path - we already have a few of these remaining that we are moving off.

      Thanks for your response - appreciated.

      • micheleariis's avatar
        micheleariis
        Steel Contributor

        Yes, unfortunately at the moment the only “modern” way is to use solutions like PnP Modern Search Web Parts. I also suggest you send feedback to Microsoft (Admin Center - Feedback) to ask for custom scopes. Hopefully they will integrate it soon 😁

Resources