Create a Simple SharePoint 2013 Employee Directory on Office365 – Part 2 – Set up an Employee Directory Page

5 minute read

The first step is, of course, to create a page where the Employee Directory will live. The approach we’re taking here is to use a page in the Search Site Collection in Office365. By default – at least in the tenants I’ve worked with – the Search Site Collection lives at https://[tenant name] This isn’t a sneaky hidden Site Collection like the ContentTypeHub (See: Hidden Content Type Hub on Office365 Tenants), but one that lives right out in the open.

When you go to the Search Site Collection directly, you’ll land on a very bland search page:

Search home page

You may also have created your own Enterprise Search Center, which may look a little different. It doesn’t really matter, though. All we want to do is to create a new page in the Search Site Collection you are using to house the Employee Directory.

Click on the cog (See the cog on the left as of this writing. It’s not unlikely that it’s taken on a new shape or color since then.The Cog) and then Site Contents. This should show you all of the Apps lists and libraries available in the Site Collection root. If you can’t get this far, then you may not have the appropriate permissions. Go directly to Jail, do not pass Go, and do not collect $200. You’ll need to talk to your Tenant or Site Collection Administrator to get the right permissions.

If permissions aren’t a problem, then click on the Pages App Library icon.

Pages Library

Once in the Pages library, go to the ribbon and create a new page.

Add a new page

When you select Page, you’ll end up on the page where you can create the page. What you’re looking for here is the “(Welcome Page) Search People” page layout. In the image below, the page layout is not available. If it is, choose it and keep rolling. If not, first take this little detour.

Choose Page LayoutClick on the cog, go into Site Settings, and choose “Page layouts and site templates” under the “Look and Feel” section at the top of the right column. (For some reason, even when I know where something is on this page, I have a tough time spotting the right link: everything looks the same. My trick is to use Ctrl-F in the browser to search for the right word rather than just scanning for it.)

Page layouts and site templates

In the Page Layouts section, add the “(Welcome Page) Search People” page layout.


Enable a page layout

The section should then look like this:

Enable a page layoutNow go back to the Pages library and create a new page. I’m calling mine “Employee Directory” with the URL set to Employee-Directory.aspx. Be sure to choose the “(Welcome Page) Search People” page layout.

Create Employee Directory page

When you click Create, you’ll end up back in the Pages library. Click on the Employee Directory page. It’ll look something like this, though if you see my photo it’ll be a little weird.

Employee Directory - CreatedBelieve it or not, you now have a fully functional page that will do much of what you want. For instance, if you type “Lastname:A*” in the search box, you’ll get all of the people whose last name starts with the letter A.

Lastname:A*But we don’t want to land on the page with nothing showing. That would require more work than we want people to do. Instead, let’s set the Search Results Web Part up so that it shows some of the people in the tenant by default.

Click on the cog and Edit Page. If you’ve never done this on a Search Results page before, you may be surprised to realized that it’s just a Web Part Page with some special Web Parts already set up for you. You’ll see that you have two Web Part Zones.

  • On the left, you have the Navigation zone. It contains only one Web Part: the Refinement Web Part
  • On the right, you have the Main Zone. It contains two Web Parts: the People Search Box Web Part and the People Search Core Results Web Part.

Employee Directory in edit mode
Click on the dropdown at the top right of the People Search Core Results Web Part and choose Edit Web Part. This will open the Tool Pane for the Web Part.

People Search Core Results Web Part Tool PaneThere’s a great deal we can do with these settings, but for now we are going to just do one simple thing. Click on the Change Query button. In the Query text box, simply add contentclass=spspeople. This sets the default search to return all people, filtered by whatever is in the search box. If you click the Test query button, you should see at least a few people show up on the right in the Search Result Preview box.

Checnge query to search for peopleClick OK to save the query, OK to save the Web Part settings, and Save on the ribbon to save the page. Now you should have a very rough first pass at an Employee Directory. You should see up to 10 people in the results, perhaps along with a photo (if they have one in their profile) and a little information about each person (if certain profile properties are populated). You my also see some strange “people-like” entities. These will usually be some crawler accounts, etc. We’ll take care of those later.

OOB People Search ResultsWhew. That’s probably enough for now. If you want to, try adjusting some of the settings in the Tool Pane for the People Search Core Results Web Part, but don’t go too crazy. In the next post in this series, we’ll look at how we can make some changes to the Display Templates so that our results are more helpful and robust.

Note: Mikael Svenson (@mikaelsvenson), my search guru and Jedi master, pointed out to me that adding contentclass=spspeople isn’t actually necessary. Once we have some other criteria in the search query, we won’t need it there. However, at this point since we don’t, and we’d like to see some people in the results, it serves a purpose.

Series Navigation<< Create a Simple SharePoint 2013 Employee Directory on Office365 – Part 1 – IntroductionCreate a Simple SharePoint 2013 Employee Directory on Office365 – Part 3 – Create Display Templates >>


  1. Hi Marc, glad to see this series. One question, when I set up the search page with the added query in the web part settings, I noticed that when I am on the page again and I type in the “Lastname:A*” query in the search box that it no longer finds people. Is this expected behavior?

    • I’m not sure what’s going on there, Jonathan. The obvious question would be whether you have someone with their last name starting with A, but I’m sure it’s not something that simple.

      Where I’ve left off in this post, my query looks like: {searchboxquery} contentclass=spspeople. If yours matches that, then you ought to be getting people back from searches.


  2. Hello, In Page layouts and site templates I dont find “(Welcome Page) Search People”. I created the site as Enterprise Search Center. I have Sharepoint 2013 Online in Office 365

  3. Hello, I have set the query and apply changes in the properties of the results. However, when I save changes on the page, automanticamente changes are lost and does not show the results. Back to see the query and see that no there I created. What could be happening in Sharepoint?


Have a thought or opinion?