How to create a custom SharePoint 2013 People Directory

In this article I explain two alternative solutions for creating a “who is who” or People Directory page in SharePoint.

Solution 1
The first solution is to create a Search People Page, which is a standard page layout in SharePoint. The standard search result web part does not show any results unless a query is specified.

To get all people to show up by default we need to modify the query used by the People Search Core Results web part. This can be done by clicking the ‘Change Query’ button in the web part properties and adding a property filter that returns all people.


Also things like sorting and refinement can be configured. See this link for more details:

In order to customize the view you could modify the existing Display Templates or create your own Templates. These links are a good starting point for creating your own templates:

Although the first solution works, I personally find creating Display Templates a hell of work and quite complex to modify. The front-end programmers without SharePoint knowledge find them even more worse. As a fact I hardly know any programmer that likes to create or modify Display Templates for fun! Beside these the business often requires different or custom functionality which might not be available in standard out of the box SharePoint Search Webpart.

Solution 2

Create your own custom Page Layout, build your own custom Client Side Components and use SharePoint Client Side Object Model CSOM (C#) or JSOM (JavaScript) to call the Search API. This way your hands are not tied with SharePoint Frontend limitations and you will be able to create a much user-friendly People Page.  An example of such a custom Page is shown below. (Please leave a message or send an email to receive the source code.)


Here are some useful links for creating search queries with SP Client Object Model (JSOM and CSOM):

Good luck with coding!

Leave a Reply

Your email address will not be published. Required fields are marked *