Microsoft Search demystified! Provide configurable search options in SharePoint, Teams & OneDrive

Microsoft Search is the unified search experience that is prevalent across Microsoft 365. Microsoft Search gives users contextual search results depending on the app they search from, be it form Word or Excel, through to SharePoint, Teams & OneDrive.

Intro

If your familiar with SharePoint search you might think this is a doddle to set up. Know your crawled properties from content sources? Managed metadata from managed properties? Well, this might not help you for modern search as not all contextual app based search results are created equally, specifically Teams and SharePoint…

Within the settings of the M365 admin center there is section called search & intelligence where you can gain access to the following configurable options within Microsoft Search:

  • Acronyms: Admin or system curated acronyms/ abbreviations used by an organisation or team
  • Bookmarks: Helps users find important information with just a search. Each bookmark includes a title, URL,  keywords and a category.
  • Floor plans: Floor plans in Microsoft Search help users find people, rooms, and spaces within a building.
  • Locations: Helps your users find addresses and locate your organization’s buildings by providing an accurate location.
  • Power BI: Support for Power BI dashboards and reports to make it easier for users to find data & analytics
  • Q&A: Creating a Q&A is similar to creating bookmarks. Answer user’s questions instead of just providing a link to a webpage.
  • Result types & verticals: Result types define how search results are shown on the page based on conditions and rules. Search verticals are tabs on the search results page that show results of a specific type or from a select source.

The problem

For all of the above options within Microsoft 365, there is a varied amount of consistency as to how each option displays within specific apps, or in some cases do not display at all. For SharePoint all of the above search options do not display in the default search results of a given site. SharePoint communication or team sites search scope is to search just the site by default. Hub sites will search the hub, plus any associated sites to the hub.

None of the above search options display from within Teams, either via the desktop app or via the browser. There also isn’t a link to organisation, or a way to see all files etc. from the search experience within Teams.

Microsoft documentation says that Acronyms, Bookmarks, Floor plans & Location only show answers on Bing, SharePoint, and Office 365. Power BI search results display in the Windows search box, SharePoint, Office 365, and Bing.

Solutions and workarounds

I only really have a solution as such for SharePoint on this one, as for Teams and OneDrive there is very little you can do to change the search result options as far as I know.

For SharePoint, the only way currently to get these options to show is to change the scope of your site. There are three search scope parameters:

  • 0 – default scope, effectively site
  • 1 – tenant
  • 2 – hub
  • 3 – site

To change the scope of your site search, you need PowerShell/ PnP. You’ll also need to be a SharePoint admin to run it, but if you are you can run this cmdlet to change the scope to tenant wide:

Connect-PnPOnline -Url https://contosodemosg.sharepoint.com/sites/Strategy -UseWebLogin
# this will prompt you to sign into your site. Use the site owner credentials to sign in

$web = Get-PnPWeb
$web.SearchScope = 1
# 1 for Tenant, 2 for Hub, 3 for Site, 0 for default behavior

$web.Update()
Invoke-PnPQuery

Once your cmdlet has run successfully, you’ll notice the change in the site targeted as when a search is initiated it will default to the “organisation” wide search results by default, showing any of the configurable options you’ve set up within Microsoft Search.

SharePoint site configured to have a tenant-wide search scope, showing a custom configured location within the search results page.

For OneDrive on web, the search experience is subtly different than SharePoint or Teams. When you search there are the following options via a drop-down: My files, All files, or Whole organisation. All files is the default setting, but you can select the scope of your search before hitting enter, or change the scope after your results are returned.

In OneDrive for web, there is a toggle within the search bar that lets you select the search scope.

Things to consider

#1 Intranet search results will not be scoped

If you are building an intranet solution or already have one in place, changing the search scope will bring in search results from Teams, SharePoint & OneDrive, so it will not be ring fenced to just “intranet” content.

#2 All sites which require the scope change will need updating

You will need to change the scope for all the sites you wish to search tenant wide. So if you have an intranet solution, all sites will need this change applying.

#3 Ensure you have the correct admin roles

When I was creating Bookmarks/ Answers/ Locations etc. I originally gave my account the Search Administrator role. This displayed more config options within search & intelligence, but when it came to publishing, it threw up the dreaded “something went wrong” error. To be able to publish, I needed to also apply the Search Editor role.