How to Enable SharePoint Restricted Search and Sites List

In today’s world of enterprise collaboration and productivity, organizations often need to control which SharePoint sites are included in searches. They do this to ensure compliance and relevancy of search results. Microsoft provides a way to manage these restrictions through SharePoint Online Tenant Restricted Search Mode. This blog post will guide you through confirming the status of restricted search. It will also guide you in enabling or disabling it. Additionally, it will help you add SharePoint sites to the allowed list for restricted searches. Additionally, we’ll cover how this affects searches using Microsoft 365 Copilot.

Confirming Whether Restricted Search is Enabled

Before making any changes, you might want to check if Restricted Search Mode is currently enabled or disabled in your SharePoint Online tenant. To do this, simply run the following PowerShell command:

Get-SPOTenantRestrictedSearchMode

This command will return the current status, letting you know if restricted search is enabled or disabled.

Enabling or Disabling Restricted Search Mode

To either enable or disable Restricted Search Mode, you can use the following PowerShell commands:

  • Enable Restricted Search Mode:
    This will restrict searches to only the sites that you explicitly allow.
    Set-SPOTenantRestrictedSearchMode -Mode Enabled
  • Disable Restricted Search Mode:
    This will lift the restriction and allow searches across all sites, subject to user permissions.
    Set-SPOTenantRestrictedSearchMode -Mode Disabled

Adding SharePoint Sites to the Allowed List

Once Restricted Search Mode is enabled, you’ll need to specify which SharePoint sites can be included in search results. To add a specific site, such as your internal learning portal or a site containing key documentation, you can use the following command:

Add-SPOTenantRestrictedSearchAllowedList -SitesList @("https://royalphoenix.sharepoint.com/sites/M365LearningPathways")

This command will add the specified site (M365LearningPathways in this example) to the allowed list for search queries.

Adding Multiple Sites Using a CSV File

If we have multiple SharePoint sites that need to be added to the allowed list, the most efficient way is to prepare a CSV file with a single column containing the URLs of all the sites you want to include. Once your CSV file is ready, you can reference it and add all the sites in bulk:

Add-SPOTenantRestrictedSearchAllowedList -SitesListFileUrl "C:\...\siteslist.csv"

This saves us time by batch-adding the sites, especially if the organization has a large number of specific sites to include in restricted searches.

How This Works with Microsoft 365 Copilot

Microsoft 365 Copilot can greatly enhance productivity by providing AI-powered assistance. However, it’s important to ensure that Copilot can access the right content. For example, if you’ve restricted search to certain SharePoint sites, Copilot will only pull results from these allowed sites.

In our scenario, let’s consider the following example:

  • Since my tenant is used primarily for R&D, there are not many sites in it yet. Just 4 of which two are
    • Default tenant Communications Site
    • M365 Learning Pathways
    • To easily identify the source which Copilot based its response on, I uploaded two different categories on each of them. Document library in default communication site contains some philosophical literary works. M365 Learning Pathways contains AI policies that are generaly available.
  • On the left, you have a Communications Portal, blocked from Copilot search (philosophical literature).
  • On the right, you have the M365LearningPathways site. It is allowed in the Copilot search. (AI articles)

When we launch Copilot and search for questions related to AI, Copilot will retrieve results from the M365LearningPathways site.

If we query topics contained in the documents in the Communications Portal document library, Copilot returns a message stating that it could not find specific information related to your query. The Communications Portal is NOT in the allowed list of SharePoint sites. Hence, it is NOT available for Copilot to search across.

This ensures that only allowed, relevant content surfaces during your search.

Conclusion

Restricted Search Mode in SharePoint Online gives the ability to control search visibility across the organization. It ensures that only trusted, approved content is accessible through searches. This includes in AI tools like Microsoft 365 Copilot. We can streamline content accessibility by enabling restricted search. We can also add specific SharePoint sites to the allowed list. Additionally, leveraging CSV files for bulk site additions helps in this process. This approach also helps in maintaining compliance and security.

By adhering to the steps outlined in this post, you can customize content accessible to Copilot for Microsoft 365 search. You can also enhance user experience across your SharePoint and Microsoft 365 environments.


Discover more from QubitSage Chronicles

Subscribe to get the latest posts sent to your email.

One thought on “How to Enable SharePoint Restricted Search and Sites List

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.