logo
search
Others

How to Filter PnP Modern Search by Office Location in SharePoint

Maira MehtabMaira Mehtab Sep 22, 2026 869 views

Question details

The user wants to filter search results by Office Location using PnP Modern Search but is experiencing incomplete results where certain users do not appear.

Product
Microsoft SharePoint
Device & OS
not provided
Scenario
Filtering SharePoint user profiles by the People:Office property or mapped refinable strings in a PnP Modern Search web part.
Observed behavior
The PnP Modern Search web part returns incomplete results, omitting specific active users even though their office location is configured.
Before you start

Ensure you have SharePoint Administrator privileges to check Microsoft 365 User Profile properties and access the Search Schema settings.

Solution 1Recommended

Verify User Profile Properties and Search Schema Mapping

Ensure that the Office property is correctly mapped to a refinable managed property and consistently populated for all users.

For PnP Modern Search to filter effectively by office location, the underlying user data must be correctly populated and mapped to a Refinable managed property in the SharePoint Search Schema.

1
Populate Office Properties

Ensure active users have the 'Office' field correctly filled out in their Microsoft 365 or Azure AD profiles. Consistent data entry is crucial for accurate filtering.

2
Check Search Schema

Navigate to the SharePoint admin center, click on 'More features', and open 'Search'. Go to 'Manage Search Schema'.

3
Verify Refinable Settings

Verify that the Office crawled property (e.g., People:Office) is properly mapped to an available RefinableString (such as RefinableString01). Ensure the mapped managed property is set to be both 'Searchable' and 'Refinable'.

4
Wait for Indexing

Allow sufficient time for Microsoft 365 to crawl and index the profile changes. Test the search filter with known active users after the indexing completes.

Indexing Delay: Changes to user profiles or search schemas are not instantaneous. Full re-indexing can take anywhere from a few hours to 48 hours to reflect in PnP Modern Search results.
Free Microsoft Office alternative

Looking for a Lighter Office Suite? Try WPS Office

While complex enterprise searches in SharePoint require Microsoft 365, for your daily document, spreadsheet, and presentation needs, WPS Office offers a powerful, lightweight, and completely free alternative that integrates seamlessly with your workflow.

  1. 1. Download the Installer: Visit the official WPS Office website and download the free installation package for your operating system.
  2. 2. Install the Software: Run the downloaded installer and follow the on-screen instructions to complete the setup.
  3. 3. Open Your Documents: Launch WPS Office and instantly open your existing Microsoft Office files without losing any formatting.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx).Lightweight installation with extremely fast startup times.Familiar user interface making migration from Microsoft Office seamless.Built-in PDF editing and conversion tools available in one single app.
microsoft office alternative - wps office

Frequently Asked Questions

Why are new employees not showing up in the PnP Modern Search by office location?

New employee profiles require time to be crawled by the SharePoint search engine. Even after their Microsoft 365 profile is populated with an office location, it can take up to 24-48 hours for the search index to update and display them in the PnP Modern Search web part.

Which managed property should I use for filtering by Office in SharePoint?

By default, you should map the crawled property 'People:Office' (or 'SPS-Location') to an available 'RefinableString' (such as RefinableString01). Refinable strings are required for search filters and refiners to function correctly in the PnP Modern Search web part.

Do guest users or external accounts appear in PnP People Search?

By default, guest or external users might not appear in standard people search results depending on your tenant's sharing and search configurations. You must verify whether the missing profiles belong to inactive, external, or unindexed accounts.