SharePoint Config

Ari Bakker's thoughts on customising and configuring SharePoint

How to: Create a Simple SharePoint 2013 People Directory

with 164 comments

I previously posted on how to create a simple people directory for SharePoint 2010. The process is slightly different in SharePoint 2013 due to the substantial changes in the search functionality so the updated steps are shown in this post.

A people directory can be useful if you want to list all the people in an organisation without users having to enter a search query. Users can then narrow down the list using filters such as Department or Job Title to narrow the results. This is really easy to set up using the default SharePoint 2013 search web parts and doesn’t require writing a single line of code. An example of what this can look like is shown below:

sharepoint people directory

Especially when the organisation only contains a few hundred people this can help users discover people in the organisation without necessarily knowing their names. The steps to create this are as follow (assuming the user profile and search services are running successfully):

  1. Assuming you have an enterprise search center set up the first step to create the people directory is to enable the people search page layout so we can create a people search results page. This can be done by navigating to the Site Settings > Look and Feel | Page layouts and site templates page and selecting ‘(Welcome Page) Search People’ in the Page Layouts section.
    sharepoint available page layouts search
  2. The next step is to navigate to the pages library and select New Document > Page from the ribbon.
    sharepoint new page
  3. On the create page screen select the Search People page layout to create a page that contains the people search results web parts.
    sharepoint create people results page
  4. 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. To do this we can select the property ‘contentclass’ and enter the manual value ‘spspeople’.
    sharepoint search build query
  5. We now have a list of people that will be displayed as soon as the user navigates to our custom people results page. By default we also have some refinements that appear if matching metadata is found within the result set. These are the Department, Job Title, Keywords and Office Location columns. We can change these to show other metadata properties that are defined in our search centre by selecting the ‘Choose refiners’ option on the refinement web part. Note that the managed property must have the ‘Refinable’ option selected in the search schema for it to be available in this list.
    sharepoint search refinements

 

Adding Sorting by Last Name

Adding additional sort options is much easier than in SharePoint 2010. To add a custom sort option such as Last Name follow the steps below:

  1. Ensure that the managed property you want to sort by has the Sortable option enabled in the search schema. To do this navigate to the Search Service Application > Search Schema, click the LastName managed property and select the Sortable: ‘Yes – active’ option. Note you will need a full crawl for this to take effect.
    sharepoint 2013 managed property sortable
  2. On the search results page edit the People Search Core Results web part, check the ‘Show sort dropdown’ option and enter the following text:
    [{"name":"First name (A-Z)","sorts":[{"p":"FirstName","d":0}]},{"name":"First name (Z-A)","sorts":[{"p":"FirstName","d":1}]},{"name":"Last name (A-Z)","sorts":[{"p":"LastName","d":0}]},{"name":"Last name (Z-A)","sorts":[{"p":"LastName","d":1}]},{"name":"Social distance","sorts":[]}]sharepoint search sorting
  3. You should now be able to sort by first or last name in alphabetical order either A-Z or Z-A.
    sharepoint search people sorting

 

Using a Table Based Layout

Another option for the people directory is to use a table based layout with column headers for properties. In SharePoint 2013 this can be done using Display Templates. In this case we need to use two display templates – a control template for the table header, and a item template for each search result item. The steps to implement this are shown below.

  1. The first step is to add the display templates to the masterpage gallery by selecting Site Settings > Master Pages and Page Layouts > Display Templates > Search and upload the two html files from the following .zip archive.
    PeopleDirectoryDisplayTemplates.zip
  2. The next step is to edit the search core results web part and in the Display Template section set the Results Control Display Template to ‘Table Result’ and the Item Display Template to ‘People Table Item’.
    sharepoint search display template selection
  3. You should now see the results displayed as a table based layout as shown below:

sharepoint people directory table

If you have worked with previous versions of SharePoint you can see that in SharePoint 2013 the search features are much richer and easier to work with. There are also a number of new features such as query rules and extensibility options such as customising the hover panel that enhance the end user search experience.

Post to Twitter Post to Delicious Post to Digg Post to Reddit Post to StumbleUpon

Written by Ari Bakker

May 17th, 2013 at 11:00 am

Posted in 2013,Configuration

164 Responses to 'How to: Create a Simple SharePoint 2013 People Directory'

Subscribe to comments with RSS or TrackBack to 'How to: Create a Simple SharePoint 2013 People Directory'.

  1. That was brilliant. I was looking for this about a few month and couldn’t work it out.
    Thanks Ari.

    Reza Nazemi

    30 May 13 at 3:24 am

  2. Hi Ari
    I am using SharePoint 365 wave 15.on the last name managed property, I cannot amend the sortable property.
    Any ideas ?

    Regards

    Nogel

    nigel proce

    5 Jun 13 at 12:07 pm

  3. Hi Ari

    When I click on a name, I get a 403 error.
    Any ideas ?

    Regards

    Nigel

    nigel proce

    5 Jun 13 at 12:24 pm

  4. Great guide but stuck on step 1 🙂 we do not see the option for (Welcome Page) search people. Our enterprise search page we created as a sub site of our main page.

    Can you advise where we may be going wrong?

    Robert Ryan

    12 Jun 13 at 4:00 pm

  5. @Robert did you create a site based on the Enterprise Search Center template? If so what options do you see in the Page layouts and site templates page?

    Ari Bakker

    12 Jun 13 at 4:57 pm

  6. Ari,

    Under page layouts all I can see that are close are:
    (Welcome Page) Search Results
    (Welcome Page) Blank Web Part page
    (Welcome Page) Splash
    (Welcome Page) Summary links

    Robert Ryan

    13 Jun 13 at 10:17 am

  7. Cool article, just what I needed after upgrading to Sp 2013 . I used the sp2010 article as well.

    great job!

    Darwin

    13 Jun 13 at 4:16 pm

  8. @Robert if you create a site collection using the Enterprise Search Center site template the Search People page layout should show up – it doesn’t seem to get added when you create a sub site using that site template.

    Ari Bakker

    14 Jun 13 at 6:27 pm

  9. @Nigel in SharePoint 2013 on Office 365 you cannot edit the existing managed properties or create new sortable properties. There are a set number of managed properties that are sortable such as RefinableString00 that you can map to the People:LastName crawled property. If you update the search core results web part to use this managed property you should then be able to sort on last name.

    Ari Bakker

    15 Jun 13 at 2:15 pm

  10. Thanks Ari, that sorted it! 🙂

    Robert Ryan

    17 Jun 13 at 10:57 am

  11. Hi, Ari Bakker,
    Thanks for the very nice article. Since the SP 2013 Preview version was published last November, we developed staff page with the same Enterprise Search Engine. The good news then was that anonymous users could see the staff pages for the different departments. Since we use the official SP 2013 we have a problem with the anonymous access to the search web part pages .. Do you have an idea why, and is there solution to make that kind of page to be readable for anonymous users.
    Thanks for your time spent at this. Best regards.

    Kalin

    18 Jun 13 at 1:16 pm

  12. Great article. How do I add other columns like mobile phone to the table layout

    Richard

    18 Jun 13 at 4:17 pm

  13. Hi Ari, Thanks for the article. One question – how do we edit the box which pops up when you hover over the results? I see you have contact details listed and options to email, etc. Thanks

    Michael

    24 Jun 13 at 7:35 am

  14. @Michael you can create a hover panel display template to change the appearance of the box that pops up when you hover over the results. This article on MSDN has more details on how to do this – http://msdn.microsoft.com/en-us/library/jj945138.aspx

    Ari Bakker

    1 Jul 13 at 7:48 pm

  15. Hi Ari, many thanks for your useful tutorial. I followed this article to set up company staff directory. Everything looks good except that I got this error message in the last step. Any idea how to fix it? Many thanks!!

    Display Error: The display template had an error. You can correct it by fixing the template or by changing the display template used in either the web part properties or result types.

    Template ‘~sitecollection/_catalogs/masterpage/Display Template/Search/Control_SearchResults_Table.html’ not found or has syntax errors. (LoadTemplate:)

    (p.s. We use Office 365 E1 plan)

    Many thanks!!

    Pedro Ng

    15 Jul 13 at 8:38 am

  16. I use active directory for source of people in SharePoint.
    There is no results for query contentclass=spspeople.
    Any idee what i do wrong?

    Matjaz

    17 Jul 13 at 11:04 am

  17. Is there any chance you can just post the code / template for your call out with the contact details please?

    The default callout has absolutely no use whatsoever, and I don’t know what parameters the fields I want are called so I cant build it myself – I want to display at least all contact details. Frankly whoever came up with the idea that authored documents would be more interesting to read than on a user directory which doesn’t actually display ANY contact details unless you go direct to the profile, really needs to be re-deployed….

    If you could do something like that I would be eternally grateful. The tutorial you posted doesn’t really help me.

    Cheers!

    hartzki

    31 Jul 13 at 2:57 pm

  18. Ari,

    I’m getting the same error as Pedro! Thing is it works for some people but not for others.

    Very strange.

    David.

    David Davies

    31 Jul 13 at 4:05 pm

  19. Hi,

    Does this work with SharePoint Foundation 2013? I read the Enterprise Search Center is not included in Foundation version is that correct?

    david

    22 Aug 13 at 2:40 am

  20. @david this will not work with SharePoint Foundation 2013 as the user profile functionality is not available.

    Ari Bakker

    22 Aug 13 at 10:26 pm

  21. Hi,

    Can I get the people directory working in SharePoint Foundation 2013 or similiar? Currently I am importing an excel spreadsheet.

    thanks

    david

    23 Aug 13 at 1:39 am

  22. Hi Ari,
    thank you for the greate post!

    Just another question, how is it possible to add phone no. mail link and so on into the hover as you show it on you first picture? Till now I was not able to find a way to do this…

    thank you

    Dominik

    3 Sep 13 at 9:06 am

  23. Hi Ari,

    Great Post!

    Just need a little help, In your Example; when you point to a specific user it shows up all company info.. But ours it shows member of and authored documents…is there away to remove them..and just put contact info?

    Thanks in advance

    Timothy James

    16 Sep 13 at 3:16 am

  24. @Timothy James you can create a hover panel display template to change the appearance of the box that pops up when you hover over the results. This article on MSDN has more details on how to do this – http://msdn.microsoft.com/en-us/library/jj945138.aspx

    Ari Bakker

    16 Sep 13 at 8:43 pm

  25. For some reason, when I get to step 4 and attempt to press the build query button, I get the message “an unknown error occured” and cannot alter the query. The logs show that “an entry with the same key already exists”. Has anyone else had this error?

    Greg

    23 Sep 13 at 11:22 pm

  26. I have the same problem a Matjaz. Query contentclass=spspeople doesn’t work. I have profiles synchronized from AD and I see informations in Mysites, so sync with AD is ok. Have you any idea why query is without any results? Please help.

    alnek

    25 Sep 13 at 8:25 am

  27. Step one seems to not apply to Office 365 (E3). Under Site Settings > Look and Feel, there is no Page layouts and site templates page.

    dave

    30 Sep 13 at 6:09 am

  28. This doesn’t seem to work. We must be on different suites because I don’t see what you are displaying here. “Refiners” looks different. The “sorting ability” doesn’t work for all options (i.e. last name sorting shows error)

    Can you provide more accurate info on the steps? Seems like there is too many gaps in this guide for me to be able to follow it completely.

    Roman Castro

    14 Oct 13 at 11:55 am

  29. Hi

    Thanks for the great article. I’m not able to get my search results preview to populate with data. User sync and search are running. Any ideas to troubleshoot?

    K

    Kim

    18 Oct 13 at 6:03 pm

  30. I am getting the same display template error:
    Display Error: The display template had an error. You can correct it by fixing the template or by changing the display template used in either the Web Part properties or Result Types.

    I found out that I only get this error in firefox, but this works in chrome and IE.

    Jean

    24 Oct 13 at 3:56 pm

  31. Hi,

    I am trying to figure out how to add mobile numbers to the people search results.

    We have account sync to O365 and can see the numbers in the accounts.

    your advise on how to do this please.

    tony

    31 Oct 13 at 3:58 am

  32. Excellent article Ari, followed your directions and it works great for us.

    What we discovered, and I think this has to be a bug in the SharePoint sort dropdown field, is the sort appears to be case-sensitive. Where all uppercase letters come before lowercase letters. This does not work well for last name sorting, where the last name ‘Znyga’ comes before ‘de la Hoya’ for example.

    Does anyone know a workaround to get the sort to be non case-sensitive?

    Nick

    6 Nov 13 at 5:57 pm

  33. what has to be done to sort on the lastname even though its set to ‘sortable’ in the properties?

    Mike

    9 Dec 13 at 2:36 pm

  34. When following these guidlines I end up with a situation, when the search results are not narrowed down in case a search term is entered in people search box.
    The result is just being highlighted amnong all the other results from default query.
    Is there a way, how to ensure, those default results get filtered out according to query typed in search box?
    Thanks in advance!

    Maris

    14 Jan 14 at 9:28 am

  35. @Pedro Ng @David Davies @Jean

    I was having the same issue that you were with it saying
    “Template ‘~sitecollection/_catalogs/masterpage/Display Template/Search/Control_SearchResults_Table…”

    Please go to:
    https:///_layouts/15/DesignDisplayTemplates.aspx
    and check if those 2 files are marked as “draft” – This is the problem.

    To fix this just Publish these versions. Now I had issues publishing the normal was as it said that they were published. Here is what I had to do.

    1. Go to Sharepoint Designer and then:
    All Files->_catalogs->masterpage->Display Templates

    2. Check OUT the Control_SearchResults_Table.html
    3. Check OUT the Control_SearchResults_Table.js
    4. Check both files in.
    5. go back to https:///_layouts/15/DesignDisplayTemplates.aspx
    and make sure those 2 files say Approved.

    6. If they do Check the site. If they dont repeat 1-5 until it does.

    There is an underlying issue here but I cant seem to find it and these steps worked for me. The issue is that the files are stuck in Draft and normal “Read only” Users cannot access Draft files.

    Paul K

    16 Jan 14 at 12:09 am

  36. Anyone have a display template like the “People Table Item” but with a thumbnail photo?

    Jeff

    30 Jan 14 at 9:27 pm

  37. Great article! Love the table results option. How did you figure that out?

    How would you present the picture in that template? or have it appear on a tooltip as you mouse over an item?

    thanks,
    Ben

    Ben

    5 Feb 14 at 2:18 am

  38. Jeff,

    I had the same requirement (to add a thumbnail in table view)..
    all you have to do is add another cell to the item_person_table.html file like:

    that will give you a thumbnail photo for the user. You have to update the headers also (different file: control_searchResults_Table.html) to add another column header otherwise column headers will not align.

    Gregor Jolly

    5 Mar 14 at 3:17 pm

  39. Ok, so the code was stripped out of my above posting.. but in the item_person_Table.html file just add a new td entry (same class = ms-vb2) containing an img tag where the src for the img tag is ctx.currentitem.pictureURL

    voila.

    Gregor Jolly

    5 Mar 14 at 3:20 pm

  40. I followed the steps above and was able to get a working table-based layout, but it only works for users with Full Control permission. Users with “read” permissions are getting, “Sorry, an error occurred” when browsing to this page. What am I doing wrong?

    Ernie Franic

    17 Mar 14 at 11:28 pm

  41. Thanks for this, Ari! You are still helping me with SharePoint from across the other side of the world 🙂

    Daryl Green

    18 Mar 14 at 12:51 am

  42. Hi Ari,

    Great article. Helped me to create a people directory successfully.

    I would like to display my search results in a table view . The same content that’s getting displayed in Detail view should be displayed in a table format/Tile format. Could you please help on this.

    Thanks,
    Deepa

    Deepa

    20 Mar 14 at 7:30 pm

  43. @Daryl thanks, I’m glad to hear that!

    Ari Bakker

    26 Mar 14 at 10:10 pm

  44. Great Article Ari.
    But is it possible to have mixed results in the same page?

    I mean Local People Results + Local Search Results. I think that is not possible to mix both sources. Only with a query rule we can add results from other sources but only 10 at best. The problem is that my client wants both result sources in the same page.

    Is this possible?

    Alvaro

    9 Apr 14 at 6:21 pm

  45. Hi

    When I hover the mouse over a contact I get details about documents that they have authored and other details but not the contact details as shown on the first image on this article. Where am I going wrong here? How can I fix this so that when hovering over a contact I get the same results as shown on the image on this article?

    Thanks

    Bujar

    27 Apr 14 at 11:48 pm

  46. Actually, I see that this same questions has already been asked on this thread but I did not see it at first. Will have a look at the Microsoft Link.

    thanks

    Bujar

    27 Apr 14 at 11:52 pm

  47. Im still new on this and the department Im working for has no info for me first of all How do I set up a search centre

    sewela

    14 May 14 at 11:34 am

  48. Thanks Ari, this worked great. The only question I have is how do I exclude SP_Install, SP_Service and SP_Crawl from the people directory result set?

    Steven

    22 May 14 at 2:57 pm

  49. Has anyone figured out how to filter out the service and test accounts from the results?

    Also, how do I add manager name or other properties into the search results?

    Candice

    11 Jun 14 at 3:37 pm

  50. Ari, this is great. I am having the same issue as Ernie though with permissions. When non-administrators run the search listing they get “Sorry something went wrong” message. It shows the departments on the left, but clicking on them still gives the “sorry something went wrong” message this is using SharePoint Online.

    Bryan

    11 Jun 14 at 5:06 pm

  51. @Gregor, is it possible for you to post the code that was dropped regarding adding the thumbnail. I have tried multiple versions of the TD entry below and I only manage a blank image placeholder…

    Matt

    26 Jun 14 at 6:32 pm

  52. Hi,

    Great post. Is it possible to show telephonenumber and other properties below the name and job title below the photo?

    Jp

    Jp

    29 Jun 14 at 9:08 pm

  53. I have the same question as Candice, how to make a filter to not show system and service accounts?

    Mark

    2 Jul 14 at 4:02 pm

  54. @Mark, @Candice, @Steven to filter out service accounts I would suggest excluding them from the user profile import. The TechNet article at http://technet.microsoft.com/en-us/library/ee721049.aspx has details. If the service accounts are in a separate OU you can exclude the relevant container from the User Profile Synchronization Connection. Alternatively you can define a Connection Filter to exclude accounts based on attributes such as “sAMAccountName starts with SP_” or exclude accounts with password never set to expire using the userAccountControl attribute – see http://www.harbar.net/archive/2011/02/22/323.aspx for more details on this.

    Ari Bakker

    2 Jul 14 at 4:53 pm

  55. I too am wondering how to pull my results from AD rather than from local SP. Is that possible?

    Jean Matuska

    2 Jul 14 at 6:29 pm

  56. Thanks Ari, but is it possible to make a filter in the People Search Core Results web part

    Mark

    3 Jul 14 at 7:34 am

  57. THANKS FOR THE GUIDE!

    Short question: Is it possible to get the refine-option “Company” to work somehow? I can see the (default) property under the “choose refiner” point but when i click on it i don´t get any content back. I can see the “company” getting mapped in the User profiles though.

    Michael

    7 Jul 14 at 9:40 am

  58. @Gregor I was able to get the profile pic added using this:

    Matt

    7 Jul 14 at 6:52 pm

  59. @Moderator… I must be posting incorrectly as the HTML code is consistently dropped. Pls advise. Placing in quotes “”

    Matt

    7 Jul 14 at 6:56 pm

  60. @Mark I used the following filters in the core search results to remove service accounts -WorkEmail:SMO-ProjectSite -AccountName:ylo*

    Matt

    7 Jul 14 at 7:02 pm

  61. @Mark… My apologies for the previous post confusion. These filter out the service accounts for me anyway.

    -AccountName:ylo* -AccountName:SPO*

    Matt

    7 Jul 14 at 7:10 pm

  62. @Gregor – one last try to post the key element of the HTML code (minus the HTML tagging so it posts as text) for the profile pic.. img src=”_#= ctx.CurrentItem.PictureURL=#_”

    Matt

    7 Jul 14 at 7:13 pm

  63. @Ari this is great thank you..I have it all working with one exception. I have the same problem that Brian and Ernie are having. In my case any user can run the search using the default display template, but only the System Administrator is successful with the table display template you supplied. Any ideas?

    Matt

    8 Jul 14 at 12:59 am

  64. @Matt: You have to publish the template for it to work with users that do not have a enough permissions. To do so edit the page –> edit the search core results web part –> in the Display Template section directly beneath the “Table Result” you should find a blue link to “control display templates” (you can see it in one of the screenshots above).

    In the following page you search for the two templates you uploaded and click on the doted line –> doted line once more –> publish main version

    This should fix your problem hopefully

    Michael

    8 Jul 14 at 11:51 am

  65. @Michael,

    Thank you very much. Publishing the templates did the trick.

    Matt

    8 Jul 14 at 7:52 pm

  66. Great article thank you. I’m using O365 SharePoint online. Is anyone else having random issues with sorting by last name? Most of our 300+ users sort properly but we have several dozen that just show up at the end of the results in a random order.

    Mike J.

    9 Jul 14 at 4:24 pm

  67. Hey,

    Great Post! Thank you very much for the table layout – it’s quite useful. Now, I want it to behave like a normal SharePoint list when it comes to filtering columns.
    I want the user to be able to filter it down on his own. Do you know if this is achievable?

    Again, great post and kind regards,
    Fabian

    Fabian

    11 Jul 14 at 1:34 pm

  68. Greetings; The item_person_table display template does not include the code for the presence stroke. I found the presence stroke code (in the item_person display template) but have failed to integrate it in Ari’s item_person_table. Any advice would be helpful.

    Thanks.

    Matt

    17 Jul 14 at 11:17 pm

  69. Thanks for great article.

    I’d like to publish the mobile attribute in the list.

    What sections in your templates would need to be updated for this?

    Thanks!

    Mark Zigadlo

    30 Jul 14 at 8:32 pm

  70. […] I am trying to build an employee directory in SP 2013 on premise and I found this article” http://www.sharepointconfig.com/2013/05/how-to-create-a-simple-sharepoint-2013-people-directory/ […]

  71. Does anyone know how to show custom properties from AD attributes in DisplayTemplate -> Item_person.html

    Mark

    26 Aug 14 at 12:54 pm

  72. I’m trying to add Mobile Phone Number to the item_person_table. I’ve added the column to control_searchresults_table. I looked up the property name for it and it’s listed as CellPhone. I went into the html and added ‘CellPhone’:’CellPhone’ to ManagedPropertyMapping, then i created a varibable for cell phone, created an if statement to find and assign the value, then create a item to post it to the table.


    var has_cell = !$isEmptyString(ctx.CurrentItem.CellPhone);

    if(has_cell == true){
    var encodedCell = ctx.CurrentItem.CellPhone;
    var displayCell = Srch.U.getSingleHHXMLNodeValue(hhProps, “CellPhone”);
    if ($isEmptyString(displayCell)) { displayCell = encodedCell}
    }

    _#=displayCell=#_

    I’ve added a mobile number to 5 of my users, but I can’t get the table to display anything. Is there a way to resolve this?

    James F.

    2 Sep 14 at 6:34 pm

  73. I figured it out I had to use the name of the managed property in the search schema MobilePhone

    so all I had to use was

    “_#=ctx.CurrentItem.MobilePhone=#_”

    with the table wrapper to get cell phone numbers to appear.

    I.E(minus the spaces)

    _#=ctx.CurrentItem.MobilePhone=#_

    James F.

    3 Sep 14 at 2:01 pm

  74. Awesome article, everything is working now. Just wondering if anyone has a way to have the results show nothing until a query is entered?

    Optimas

    5 Sep 14 at 8:45 pm

  75. @optimas if you remove the contentclass=spspeople text from the query text box in the search results Web part properties then no results will show until a query is entered

    Ari Bakker

    5 Sep 14 at 10:40 pm

  76. Trying to create a new search results page, missing People Search and Search Results page layouts on a Site Collection created using Team Site. How to enable these page layouts in order to create new pages.

    -RK

    Arkay

    8 Sep 14 at 9:59 pm

  77. @Ari Bakker thanks for the suggestion, that did the trick, however the standard sharepoint message “Nothing here matches your search” followed by a bullet list of tips was even worse lol. I ended up setting paging to 10 items and called it a day. Would have been nice to just have the results section start out blank but probably need custom code for that.

    Optimas

    10 Sep 14 at 4:09 pm

  78. Hi Ari, I have a little problem in step 4. Instead of showing alot of result, there is no result for me. Just see RelevantResult(0) in SEARCH RESULT PREVIEW section

    Leo

    24 Sep 14 at 8:54 am

  79. Great article.
    Any suggestions how to filter out room/resource mailboxes (dirsynced obviously for Exchange Online) from SharePoint Online profiles? Under User Profiles there seems to be no difference on user properties between a person or a room.

    Carry Megens

    15 Oct 14 at 11:37 pm

  80. This is excellent! Thank you for providing the great walk through.

    How would we go about adding additional fields to the table template?

    Justin

    16 Oct 14 at 10:28 pm

  81. Thanks so much for this article. Crazy that this is not built into SharePoint. For those using SharePoint Online I wanted to share my discoveries. Mainly, I was not finding all of the right ‘parts’ to make this work on our main site collection. I realized, however, that SharePoint Online creates a Search site collection (http://yourmainsite/search). Once I started creating pages there all was well. Now I will just link to the Directory page from our main homepage.

    Tom

    20 Oct 14 at 10:09 pm

  82. Hi,

    Is it possible to add a hover panel when using the table display template ?

    Thanks in Advance 🙂

    Mustaffa

    24 Oct 14 at 7:25 am

  83. @James F. I like the idea of adding mobile numbers like you did but did nog manage to get this working yet…

    Are you willing tot share your changed template files?

    Hans

    17 Nov 14 at 3:29 pm

  84. […] upgrade for this functionality and am looking for a way to mimic this in foundation. I have found this article on SharePoint Config that is EXACTLY what I want but not available for me to use.. sadly. I have also found this […]

  85. If I use a table-based layout, how can I easily replace the default “Phone” field with “MobilePhone”?

    Kevin

    7 Dec 14 at 10:11 am

  86. I could see few people wanted to add photo along with the table. After some play around i managed it

    Update control_serachresults_table.html

    Name
    Phone
    Email
    Job title
    Department

    and then Item_person_table.html add this line as the first TD
    “”

    Thanks Ari for useful post

    Rajesh Vartak

    11 Dec 14 at 9:10 pm

  87. Thank you so much for these display templates! Very helpful.

    Jen

    12 Dec 14 at 9:17 pm

  88. […] (@aribakker) out there that shows how to set up a simple a Employee Directory on SharePoint 2013: How to: Create a Simple SharePoint 2013 People Directory. For this series, I owe credit to Ari for getting me started and showing me the main path. I […]

  89. @Kevin For Mobile Phone number:

    add ‘MobilePhone’:’MobilePhone’ to the in the Item_Person_Table.html file.

    then add this to the table:
    _#=ctx.CurrentItem.MobilePhone=#_

    Hope that this helps. Worked for me!
    Thank You Ari for a great post.

    JiBo

    22 Dec 14 at 12:00 am

  90. Ari:

    This is an excellent post and helped me immensely. Recently I’ve been working on similar functionality for Office365 and your post got me a lot of the way there. Since Office365 has its quirks, I’ve started a series on how I made things work there.
    http://sympmarc.com/series/create-a-simple-sharepoint-2013-employee-directory-on-office365/

    Thanks,
    M.

    Marc Anderson

    24 Dec 14 at 4:43 pm

  91. Hi!
    This is really great!
    But I can’t add an column with mobilePhone. Can anyone please help me?

    Thanks

    PH

    8 Jan 15 at 3:28 pm

  92. […] In the prior two parts of the series, I covered the idea of an employee directory (or associate directory, or person directory, or whatever you call the people in your company/organization/commune) and how to create the basic page. Once again, I want to give credit to Ari Bakker’s (@aribakker) post that shows how to set up a simple a Employee Directory on SharePoint 2013: How to: Create a Simple SharePoint 2013 People Directory. […]

  93. Hi.

    If you want a team members directory and have Office365 you can check out my sharepoint app “Happy Team”. Check out the demo at http://www.happysolutions.se/apps/htm or search in office store for “Happy Team” to find it. You can try it for free. It’s plug n play – add it and start using it!

    Henrik

    10 Jan 15 at 8:27 pm

  94. Hi,

    I would like to remove “Authored Documents” from people search hover panel.Can any one help me find which display template or item template do i need to modify?

    Thanks,

    Anjalee

    13 Jan 15 at 9:15 pm

  95. Hi Ari ,
    Thanks so much , this article literally saved me ,,thanks again , one question tho , where does the search results gets its data from ? is it mysite or where , i need to delete some users that have left the company and i currently cant find any widget that allows this , pls pls urgent help needed

    jay

    28 Jan 15 at 4:41 pm

  96. @jay the data is coming from the user profile service which typically gets user information from Active Directory

    Ari Bakker

    28 Jan 15 at 4:52 pm

  97. Hi Ari…

    Thanks for this – just what I’m looking for.

    I’ve tried to add 2 custom properties – I’ve created them under Manage User Properties, populated the data for me (as a test), Added New Managed Properties and created the Crawled Properties for the 2 items, Done an incremental crawl, and the results aren’t showing up in the table layout. The data is populated if I go into mysite or into my profile, but it just won’t show up on the template – I’ve made sure to add to the Display Template and Item Display template… ideas of what I’m missing?

    I’m on Sharepoint 2013
    Thanks

    Also – in 2013 editing the XLS is not possible?(referencing your next post on the subject)

    Karen

    28 Jan 15 at 9:45 pm

  98. @karen if you have recently updated the properties used in the display template you might need to go to the result sources page from site settings and refresh the properties. Also JavaScript display templates replace xslt as a means for customising search results in 2013.

    Ari Bakker

    28 Jan 15 at 10:45 pm

  99. Thanks so much , this article literally saved me ,,thanks again , one question tho , where does the search results gets its data from ? is it mysite or where , i need to delete some users that have left the company and i currently cant find any widget that allows this , pls pls urgent help needed

    jay
    28 Jan 15 at 4:41 pm
    @jay the data is coming from the user profile service which typically gets user information from Active Directory

    Thanks Ari, , so does this mean that i cant delete it directly from the created people directory site ??, how would u suggest i go about deleting users ?

    jay

    29 Jan 15 at 11:11 am

  100. Thanks Ari, so does this mean that i cant delete it directly from the created people directory site ??, how would u suggest i go about deleting users ?this is because if i delete a user from active directory ,the user profile is still present in the people directory.

    jay

    29 Jan 15 at 11:25 am

  101. […] (@aribakker) post that shows how to set up a simple a Employee Directory on SharePoint 2013: How to: Create a Simple SharePoint 2013 People Directory, he shows how to tweak the Lastname property to make it […]

  102. Thanks for this Ari.

    I have got this working however I have a few issues:

    1. When I click on the name I get “Sorry, something went wrong User not found.”

    2. Not all Departments are displayed on the left hand side navigation

    3. When I hover over a name the preview only shows Authored documents and below it displays View Profile and Follow – how can i add more options like you have above e.g Job Title, department, phone number, secretary

    Thanks in advance.

    Chad

    19 Feb 15 at 5:05 pm

  103. Sorry please ignore point no 2 I solved it.

    Chad

    19 Feb 15 at 5:17 pm

  104. I have a Office365. For some reason the “Office” column in the table is empty. How do I get Office to appear?

    Nicole

    26 Feb 15 at 6:40 pm

  105. spspeople does not produce a list

    diane

    3 Mar 15 at 5:20 pm

  106. Is this doable on DFoundation 2013? As we do not currently have the budget for licensing.

    John Nav

    18 Mar 15 at 11:48 pm

  107. Thanks Ari for the informative article. Well written. Quick Question – Is the table based layout is just a table display or the columns are sortable or filterable like any SharePoint list view?

    Regards,
    Khushi

    Khushi

    1 Apr 15 at 6:58 pm

  108. Thanks @Khushi – This does not use a SharePoint list view so the columns themselves are not filterable or sortable. You can, however, filter using the refiners and sort using the drop down as shown in the article.

    Ari Bakker

    2 Apr 15 at 2:51 pm

  109. @John Nav this will not work with SharePoint Foundation 2013 as the user profile functionality is not available.

    Ari Bakker

    2 Apr 15 at 2:51 pm

  110. I have got this working however I have a few issues:

    1. When I click on the name I get “Sorry, something went wrong User not found.”

    2. When I hover over a name the preview only shows Authored documents and below it displays View Profile and Follow – how can i add more options like you have above e.g Job Title, department, phone number, secretary

    Thanks in advance.

    Chad

    8 Apr 15 at 9:44 am

  111. […] have found an OOTB solution. I am following this […]

  112. Like Chad commented, even I cannot see more details like Job Title, department, Phone number etc. when I hover over the name. Could you please help us?

    Rookio

    10 Apr 15 at 4:28 pm

  113. Great posting but I am having the same problem as 3 other people here.

    If I use contentclass=spspeople I get no results.

    I am using the simplified version of the UserProfile service where it imports AD information. I have 500 user profiles.

    If I use the standard search without the suggested mods I do get results. What gives?

    Solvetech

    19 Apr 15 at 11:47 am

  114. Great information here on creating and employee directory in SharePoint. We have our directory setup and we are pulling the pictures from O356, but the sync process does not seem to work so if someone adds a new picture to O365 that picture will not show up in the employee directory unless the person browse to my.sharepoint.com/PersonImmersive.aspx link and even then is takes days. Any idea around this? The company does not want people uploading their own pictures for security reasons. So is there a way to pull the pictures from O365 easily.

    Madra

    30 Apr 15 at 4:19 pm

  115. Great and useful post. I am facing issue with the display of the Search box on the page. It is being displayed at the right side corner of the page. But i want it on the centre of the page similarly in the post above. Any help/suggestion greatly appreciated.

    Pk

    11 May 15 at 11:31 am

  116. Great post! Thank you, Ari!
    I am facing an issue on the top People Search Box. It does not return any data once I followed the instruction to configure the People Search Core results web part.
    I am on SharePoint 2013 online. I did a test – if I remove “contentclass=spspeople”, the people search box works. If I put it back, it stops working. Does anyone have the same issue? Did I miss anything? Thank you for help!
    Rebecca

    Rebecca

    28 May 15 at 3:08 pm

  117. I’m using SharePoint 2013 Enterprise Edition and I also have AD sync with my users. How can I use AD instead of using the spspeople? When I put that in I don’t get any results. My users are in AD.

    Melvin

    3 Jun 15 at 6:52 pm

  118. The link above that is supposed to reference Hover panel display template doesn’t really have anything any more. However, this one does:
    https://technet.microsoft.com/en-us/library/dn386874.aspx

    Bethany Amborn

    12 Jun 15 at 11:44 pm

  119. This is exactly what i need – however my site is setup and we did not select the enterprise search center set template so when i go to create a new page i am not prompted to select the layout.

    In the look and feel section i do not have a template option.

    I do not want to start over on our site – lot of work thus far.

    Please help

    Dean Swick

    15 Jun 15 at 9:37 pm

  120. @Dean Swick you will need to activate the SharePoint Server Publishing Infrastructure feature at the site collection level and the SharePoint Server Publishing feature at the site level. You will also need to go to the master page gallery and change the following properties on the PeopleSearchResults.aspx page: Content Type = Page Layout, Associated Content Type = Page Layout Content Types – Welcome Page. You should then be able to follow the instructions to create a page using the People Search Results page layout. I haven’t tested this so would recommend trying things on a non-production site first to ensure there are no unintended side effects.

    Ari Bakker

    23 Jun 15 at 10:27 am

  121. […] a pretty simple one. I followed a great article with very detailed and straightforward steps posted here. The following article is an extension to the functionalities built within a SharePoint 0ffice 365 […]

  122. […] but I’m charged with creating an Employee Directory. I’m using the instructions in this article, but I’m a little perplexed by the […]

  123. If anyone had issue sorting by job title, here is how i fixed it. This was a great article that I enjoyed since SP2010 🙂

    Khoa

    27 Aug 15 at 4:22 am

  124. Hi Ari,

    Thank you for the detailed post – it helped me create a very useful SP employee directory. I was wondering if it’s possible to display only employees from certain AD Security group? I can display employees from certain department thanks to the refinables, however, I really need a certain group of people which is already in an AD Security group.Any help/links to possible solutions/suggestions how to tackle this task will be appreciated! Thanks in advance!

    Hex

    8 Sep 15 at 2:28 pm

  125. Dear all, I found this post very nice and the idea brilliant !

    Because like most of you I need to create a Directory site for my company I decided to get use of this experience but unfortunately I’m quite stuck at beginning.

    I’m using Office 365 SharePoint online.

    As the guide, I succeed to create a SharePoint site based on Enterprise Search template and I succeed to mofify properly the properties as described. Once I created the peopledirectory page and trying now to modify this. Going to modify the Search core result Query I’m Always getting the following error:

    Sorry, something went wrong. The search request was unable to connect to the Search Service.

    Correlation ID: 2eb22c9d-5096-2000-09b5-405f647201b3

    anybody have some idea ? What I’m doing wrong ?

    Thanks in advance to all

    Brgds
    Max

    Max

    10 Sep 15 at 9:51 pm

  126. Hello Ari!

    I can’t edit the page after I create it. When I click “edit page” the “Loading…” box stays forever and never goes to the edit page.

    How can I solve this issue?

    Thanks.

    Niko

    Niko

    12 Sep 15 at 12:03 am

  127. […] a pretty simple one. I followed a great article with very detailed and straightforward steps posted here. The following article is an extension to the functionalities built within a SharePoint 0ffice 365 […]

    Niftit

    21 Sep 15 at 4:01 pm

  128. Hi

    Just like to say that this is a great idea that has worked very well for me. Like many others we have implemented this in Office 365, there are a few things to watch out for.

    All of our users have uploaded profile photos via Outlook or the Office 365 portal so I have added the users photo to the to the staff directory table using some of the suggestions in the comments above and I found that most of the users photos are not showing up or are showing. This has something to do with the way SharePoint Online interacts with Exchange Online (where the photo is stored) the users photo will only update to SharePoint Online from Exchange Online if/when the user visits there SharePoint Online my site. If the user has not visited the my site then you will not get a photo, this normal so Microsoft tell me.

    The way the photo is handled in Exchange Online and Lync/Skype Online is different so when a user uploads a photo it will show almost instantly in Outlook, Lync/Skype and the Office 365 portal. So instead of asking all my user to log into their SharePoint Online my site every time they updated the profile picture, I was able to pull the profile picture from Exchange Online using the following URL:

    https://outlook.office365.com/owa/service.svc/s/GetPersonaPhoto?email=_#=uEmail=#_&size=HR96x96

    I hope this helps other with the same issue

    Reference URLs:

    https://mysharepointlearnings.wordpress.com/2015/05/28/displaying-user-profile-picture-in-apps/

    http://www.threewill.com/user-photo-sync-behavior-in-office-365/

    Chrisw

    29 Oct 15 at 12:54 pm

  129. I have some issues with the step Adding a Table Based Layout. I uploaded the 2 files to the folder and published them but when I modified the Search Core Results web part, neither the Table Result nor the People Table Item was available. What could be the issue?

    Thanks in advance!

    Sam

    3 Nov 15 at 1:54 pm

  130. Hi Ari,

    Thank you for useful post. I have a question, How to send an email to a group of employees by using Employee Directory?

    Thanks,

    Katan

    18 Nov 15 at 5:37 pm

  131. On table format, is there anyway to include pictures too? Or in picture format, is there any way to include workphone number and office location?

    adit

    7 Jan 16 at 6:43 pm

  132. Hi All
    can we display only name and date of birth of all the user

    Saani

    20 Jan 16 at 6:15 pm

  133. I am having issues displaying anything when typing in the code as above. Any further advice?

    Martin

    28 Jan 16 at 2:17 am

  134. I want to add MobilePhone but it is not working. I have check the Profile permissions and everyone can read the MobilePhone Property. I am using: _#=ctx.CurrentItem.MobilePhone=#_

    What am I missing?

    Doug

    28 Jan 16 at 3:47 pm

  135. Hi Ari

    I love your solution! But I’ve got a little question: Your solution works fine for AD Users. What should I do to prepare it to show Active Directory Contacts?

    Thanks for your tipps 🙂

    Abhijit

    abhijit

    5 Feb 16 at 2:19 pm

  136. […] Active Directory user profiles are imported to site. Followed set up directions found here: http://www.sharepointconfig.com/2013/05/how-to-create-a-simple-sharepoint-2013-people-directory/ […]

  137. would like to add picture to table view, any help?

    Robert Woods

    3 Jun 16 at 4:47 pm

  138. Is what I used for the table format if anyone else is looking for an answer.

    Now, how can I replace that Picture URL with an outlook picture url? https://outlook.office365.com/owa/service.svc/s/GetPersonaPhoto?email=_#=uEmail=#_&size=HR48x48

    Robert Woods

    3 Jun 16 at 6:16 pm

  139. I need to how I can sort this in 3s per row in that search results webpart??

    Mavusie

    15 Jun 16 at 1:28 pm

  140. 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

    Pablo Caceres Vasquez

    10 Jul 16 at 8:19 am

  141. Hi Ari,
    Great solution…thanks you saved my time.
    I hove small question. How to display extension attributes? We are synchronizing some from AD and we would like to display them on search page. Could you point me how to achive that?

    Thanks a lot

    Krzyszof

    15 Jul 16 at 9:11 am

  142. Many thanks for a really helpful article and I’ve used your table layout as our preference.

    Of course the users want more! I’d like to add a column for the “company” attribute we pull in from AD. I’ve made several attempts at editing the two files to achieve this, but not being a coder, I think I’m missing something! Any change you can do the needful?! 🙂

    Cheers, Ellya

    Ellya

    26 Jul 16 at 11:18 am

  143. Hello, I have set the query, refinement 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?

    Pablo Caceres Vasquez

    12 Aug 16 at 7:11 am

  144. […] wish to change the web-part to show a list then download and implement the web-part layouts from http://www.sharepointconfig.com/2013/05/how-to-create-a-simple-sharepoint-2013-people-directory/ (http://www.sharepointconfig.com/downloadPeopleDirectoryDisplayTemplates.zip). Once downloaded […]

  145. First of all, this was a very good article. Thank you! Two Questions: 1st. We are trying to remove the VIEW DETAILS as we don’t want to show the Delve / Onedrive content. We just want a very simple company directory. After contacting Microsoft, they said there is no out of box way to do this, and that it would require custom CSS. By chance can anyone help here? I am not a programmer…
    2nd. We have tried to add additional fields, such as phone number to the directory but the query test does not yield results. Some research leads me to believe that we need to modify the search query. Can anyone confirm this please?
    Thank you!!!

    Shannon

    2 Mar 17 at 5:14 pm

  146. Easily Create And Display Employee

    […] e suggestions in the comments above and I found that most of the users photos ar […]

    Mattress Blog

    18 Mar 17 at 1:23 am

  147. Greetings, great read. We tried deploying this to our SharePoint 2016 instance. We are having an issue though, anyone without modify permissions can’t use the page (Intranet Visitors for example).

    The user gets the department and job title list on the left, but the phonebook list on the right just displays “Sorry, something went wrong.”

    Do we know what minimum permissions are for this page to function and on what object/list/site?

    Thanks again

    Josh

    2 May 17 at 7:11 pm

  148. Hi Great post ,

    How did you got Department, Number and other links like Email on Hover.

    Naman Suri

    6 Jun 17 at 12:30 pm

  149. Great article, I tried with SharePoint 2016 but results are all coming without any line break on result page. Any hint where to made the change in the template to display each result in a new row in table?
    Once again Thanks

    Umr

    6 Jun 17 at 5:17 pm

  150. This is awesome just the table result Office column doesn’t work, and I can’t seem to figure out why. I see others are having this problem as well. The refinement for Office works, just doesn’t show in the column.

    Trey

    7 Jun 17 at 4:22 pm

  151. Hi. Yes excellent post. This used to work on our 2013 on-premise but having setup a new 2016 on-premise we are having same problem as Josh above. “Sorry, something went wrong”

    Any help would be greatly appreciated…
    Thank you

    Steve

    14 Jun 17 at 10:24 am

  152. Josh, were you able to solve the problem? We are having the same issue under SharePoint 2016. “Sorry, something went wrong” for anyone without modify privs.

    Holly

    20 Jun 17 at 1:15 pm

  153. Hi,
    We would like to implement this, however we cannot find “companies” as a refinable string. Is there a step not provided here in order to obtain “companies”?

    Thanks!

    Jessica Urquiola

    31 Jul 17 at 9:43 pm

  154. I have added the template and it works for me but no other uses unless it is an elevated account.

    Any suggestions?

    LATHANIEL

    10 Aug 17 at 9:02 pm

  155. How do you get from step 3 to step 4 in this article? You take a leap from one thing to another. I am stuck at step 3.

    Many thanks.

    Ivy Grad

    28 Aug 17 at 2:24 pm

  156. Beginning Powershell For Sharepoint 2013

    […] t visited the my site then you will not get a photo, this normal so Microsoft te […]

    Beginning Blog

    10 Sep 17 at 1:01 am

  157. How are the resources added to the directory? Is this process limited to individuals with a Sharepoint Account?

    I want to be able to create a staffing roster inclusive of contractors who are not employees/have license to site.

    Aaron

    6 Dec 17 at 4:28 am

  158. How do I remove the Office column from the table view? Works great, thanks very much!

    Gabe

    20 Apr 18 at 8:48 pm

  159. this looks EXACTLY what I am looking for but I’m stuck because I don’t know Sharepoint. Anyone want to help out a non-profit?

    Mark Mancini

    24 Aug 18 at 6:04 pm

  160. I’m having trouble getting it to work with O365. We are a non-profit if anyone can assist! 🙂

    Mark Mancini

    19 Sep 18 at 8:00 pm

  161. Hi
    I need to display mobile number with work phone. I tried to update the code but it dint work. Any suggestions how to update mobile phone to display in the site
    thanks in advance

    sravani

    31 May 19 at 4:52 pm

  162. Hi:
    Its working fine. I have added custom properties to the user profile. I was able to filter and display user profile as per your steps. I need to export to excel the data , what ever I am displaying in the screen. How to generate report to excel data that we are displaying in the screen.
    thanks in advance

    SharePoint M

    9 Sep 19 at 4:39 pm

Leave a Reply

*