In this article I explain two alternative solutions for creating a “who is who” or People Directory page in SharePoint.
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.
Here are some useful links for creating search queries with SP Client Object Model (JSOM and CSOM):
Good luck with coding!