To build an employee directory in SharePoint, add the free PnP Modern Search web parts to your tenant, then put a Search Box, a Search Filters and a Search Results web part on one page. Point the results at the Local People Results source, choose the People layout, and add a Department filter, and people can search by name, filter by department and hover over anyone to see their profile card.
Every value in the directory comes from SharePoint user profiles, which sync from Microsoft Entra ID: name, job title, department, office, phone and manager. Those are what your filters and cards show. I recorded the video in June 2023 with an earlier release of PnP Modern Search version 4. The project is still on version 4 and released 4.25.0 in September 2026, so the web part settings in the video still apply, while the admin centre screens around them have moved.
Before you start
- Someone needs the SharePoint Administrator role (or above) to upload the package to the tenant app catalogue and approve its API permissions. Without that role, you’ll need to ask your admin team.
- Know what PnP Modern Search is. It’s an open source set of web parts maintained by the community on GitHub, with contributors from Microsoft and elsewhere. It’s free, and support comes from the project’s GitHub issues rather than Microsoft.
- Check your Entra ID data. Look at a few profiles. If department names are inconsistent (“Marketing”, “Mktg”, “Marketing Team”), the filter will show all three.
- Decide on the API permissions. They’re optional. Without them the directory still works, but the Microsoft Graph profile card on hover and the presence indicator won’t.
How do you install PnP Modern Search?
- Download pnp-modern-search-parts-v4.sppkg from the PnP Modern Search releases page.
- In the SharePoint admin centre, go to More features, and under Apps select Open.
- On the Manage apps page, select Upload and choose the .sppkg file, or drag it in.
- In the Enable app panel, decide whether to tick Enable this app and add it to all sites. I left it unticked, which makes the app available for site owners to add to the sites that need it.
- Select Enable app. The panel tells you API access must be approved.
- Go to Advanced, then API access in the SharePoint admin centre and approve each pending request for PnP Modern Search, one at a time. In my demo there were 14 of them. The person card needs User.Read, People.Read, Contacts.Read and User.Read.All; presence needs Presence.Read.All.
- On the site where the directory will live, select Settings, then Add an app, and add PnP Modern Search Web Parts v4. Four new web parts appear when you search for “search” in the web part picker.
How do you build the people search page?
- Create a new blank page and call it something people will search for, like People directory.
- Put a one-column section at the top and a one-third left section underneath. Add the Search Box web part to the top, Search Filters on the left and Search Results on the right.
- Edit Search Results. Leave the data source as SharePoint Search and change Result source ID from the default local SharePoint results to Local People Results. This scopes the web part to people.
- On the next page of settings, choose the People layout.
- Connect the search box: set the query text to a Dynamic value, choose the Search Box web part as the source and Search query as the property. Set a default value of
*so everyone shows before anyone types. - In the same panel, turn on the connection to the Search Filters web part.
- Under Sort settings, add LastName as the default sort, ascending, and let users sort on it. A Sort by control appears above the results.
- Edit Search Box and add placeholder text such as “Search for someone”, then publish.
In my demo, typing Deborah returned her straight away, and the sort control switched the list between A to Z and Z to A by last name.
How do you add a department filter and profile cards?
- Edit Search Filters and connect it to the Search Results web part as its data source. The connection has to be set on both web parts.
- Add a filter with the field Department, the Checkbox template and Expand by default on, then save.
- Back in Search Results, open the layout settings and set the Component size (I used Regular).
- Turn on a person card. Show persona card on hover (LPC) uses the native SharePoint profile card. Show persona card on hover uses Microsoft Graph and needs the API permissions from the install. The project’s docs warn that the Graph card fetches data for every person, which slows pages with a lot of results.
Department works as a filter without any search schema changes because it’s already a refinable managed property (in my tenant it isn’t sortable, so it can’t be the sort field). Selecting Marketing narrowed the list from every employee to the marketing team, and I could then search by name within it. Hovering over Grady showed he was a designer in the R&D team.
How do you show a department’s team on its own page?
Department pages often need a “meet the team” list. A Search Results web part can build it from the Department field, so nobody has to edit the page when someone joins or leaves.
- On the department page, add a Search Results web part on its own. No search box or filters are needed.
- Set Result source ID to Local People Results again.
- In Query template, enter the department, for example
Department:Marketing. - Choose the People layout, turn off the results count, give the web part a title like Meet the team and turn on the persona card.
On my Marketing page the web part listed Miriam, Megan and Alex. Changing the query to Engineering swapped in the engineering team with no other edits, and anyone whose department changes in Entra ID moves to the right page once the profile sync and the next crawl have run.
Three things I’d sort out before launching a directory
- Fix the profile data first. Every value in the directory comes from Entra ID, usually fed from your HR system. I’d agree one list of department names, check job titles and offices are filled in, and know who updates them when someone changes role. A person with a blank department never appears under a department filter.
- Check whether people search already covers it. SharePoint’s own search page has a People tab that finds people by name, with their profile card. If all your staff want is “find Deborah’s phone number”, that may be enough. I’d install the PnP directory when people want to browse by department or see a team list on a department page, because the People tab can’t do either.
- Give the solution an owner. PnP Modern Search releases updates every month or two. Somebody should know which version is in your app catalogue, read the release notes and test the directory page after an upgrade. Guest users also can’t load web parts from the app catalogue by default, so if guests use your intranet, check the project’s guidance on the CDN option.
To filter by anything beyond the built-in properties, such as a custom profile field, you’ll be mapping crawled properties to refinable managed properties, which I cover in building a custom SharePoint search page.
What to watch for
- The sort dropdown is incomplete. It only lists properties marked Sortable and doesn’t show every RefinableString name or alias, so type those in manually.
- Profile changes aren’t instant. Entra ID changes reach SharePoint profiles in batches on a schedule, and then the search index has to catch up, so allow time before testing a change.
- Some accounts never show. Accounts with sign-in blocked in Entra ID, or that aren’t licensed, aren’t processed by the profile sync.
Frequently asked questions
Is PnP Modern Search free and supported by Microsoft? It’s free and open source, published on GitHub under the microsoft-search organisation and maintained by community contributors, some of whom work at Microsoft. It isn’t a Microsoft product, so there’s no Microsoft support ticket for it. Questions and bugs go to the project’s GitHub issues.
Can I build a SharePoint employee directory without third-party web parts? Partly. The standard People web part shows a hand-picked list of profiles on a page, which you update yourself. Microsoft Search also doesn’t support adding a custom query to the People vertical, so you can’t scope that tab to one department.
Why is someone missing from the directory? Check their profile in Entra ID first. Accounts with blocked sign-in or no licence aren’t synced to SharePoint profiles, and someone with an empty department field won’t appear when a department filter is selected. Recent changes also need time to sync and be indexed.
Do I need to be a SharePoint admin to build the directory page? Only for the install. After a SharePoint Administrator uploads the package and approves the API permissions, any site owner can add the app to their site, and anyone who can edit the page can configure the web parts. If you only want the directory on one site, a site collection app catalogue avoids a tenant-wide install.