How to Filter PnP Modern Search by Office Location in SharePoint
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.
Ensure you have SharePoint Administrator privileges to check Microsoft 365 User Profile properties and access the Search Schema settings.
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.
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.
Navigate to the SharePoint admin center, click on 'More features', and open 'Search'. Go to 'Manage Search Schema'.
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'.
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.
Review PnP Modern Search Web Part Configuration
Confirm the web part query settings are correct and that missing users are not being excluded due to their account status.
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. Download the Installer: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install the Software: Run the downloaded installer and follow the on-screen instructions to complete the setup.
- 3. Open Your Documents: Launch WPS Office and instantly open your existing Microsoft Office files without losing any formatting.

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.




