Office 365 and SharePoint – Company Directory and People Finder with SharePoint Search and User Profiles

In Office 365 SharePoint, a company directory is useful for all employees, so when reading this post, the intent is not to imply that the Company Directory and People Finder we see in this blog post is only supposed to be used by Human Resources (HR). Instead, Human Resources will leverage SharePoint Search to build a company directory in Office 365 that is available to all employees of the organization. This is a common feature in Intranets, used in many business management scenarios, and can be built using only out-of the box features.

Reviewing User Profiles and the User Profile Service in SharePoint

In this first demonstration, you will need to be a SharePoint Administrator to follow-along with these steps. If you’re not, partner up with your IT team to validate. The goal is for the Human Resources team to build a quick search for people that returns their Picture, Name, Department, and Work E-mail. Something like this:

Office 365 SharePoint Human Resources Person Result.

But, where will the HR department get this information from? From the SharePoint User Profile Service:

O365 SharePoint Human Resources get to the User Profiles.

After going to ‘Manage User Profiles’, and looking up a name, you’ll find a variety properties that define a user (just like the properties on a document, list item, site page, etc.).

Office 365 SharePoint User Profile Properties.

Now the key to success with these profiles is that they must be kept up to date. If you work for a large organization, this will very likely be managed by Information Technology, and as a Human Resources representative, you won’t need to worry about these properties. But, if you’re from a smaller organization, you may in fact be charged with keeping these properties updated. If the users’ profiles are not updated and accurate, then your people finder and company directory will be outdated an inaccurate.

For this example, SharePoint Search will be depending on the following properties to populate the Company Directory: Name, Department, and Work Email (not shown in the image above).

Building the SharePoint Search Page

Even though this post is tailored to Human Resources (HR), you should read the blog posts on Office 365 and SharePoint – Sales Contract Lifecycle Management (CLM) if the subject matter which I don’t cover in depth below is unclear. In particular here are other helpful posts on topics referenced. Please have read:

  • Adding pages with web parts. The subject is covered in depth…particularly in this post.
  • Keyword Query Language (KQL) and managed properties in the Content Search Web Parthere.

Now, terms like CSWP, KQL, managed property, etc. should all be familiar. Let’s continue…

In advance, here’s the query we’ll use the following KQL value for the  Content Search Web Part:

{SearchBoxQuery}* WorkEmail:@contoso.com


Also, in advance, note that WorkEmail is automatically promoted to a managed property from the People content type.

O365 SharePoint User Profile Work Email as WorkEmail managed property.

Okay, our query above reads, “All results filtered by anything matching the SearchBoxQuery (even empty) and where WorkEmail contains ‘@contoso.com”. So, in the case that a user doesn’t specify a search query, we’ll be pulling all People that have ‘@contoso.com’ in their Work Email address.

So, why are we filtering on “WorkEmail contains ‘@contoso.com'”? If the Human Resources team configured the “Select a query” filter to the “Local People Results (System)” in the CSWP, look at what’s returned without a WorkEmail filter.

O365 SharePoint too many results in People content type.

There are a bunch of objects in SharePoint that are of the “People/Person” content type, but they are system accounts and not actual valid employees. Fortunately, they don’t have e-mail WorkEmail addresses in their user profile, and all valid employees do. Therefore, we add a filter on WorkEmail:@contso.com, and now we see what we expect:

O365 SharePoint Human Resources valid people search results.

Now, let’s add an ascending sort by Last Name (i.e. the LastName managed property):

O365 SharePoint Sort People results by last name.

And, finally, we’ll set the Property Mappings on the “Picture on left, 3 lines on right” Display Template, and increase the number of items to show:

Company Directory CSWP settings.

Company Directory Content Search property settings.

Validate the Company Directory and People Finder

With the Sales Contracts Quick Search that the Westmorr Sales team finished in this post, they had to modify the Display Template in order to get the results the way they wanted. Here, Human Resources (HR) was able to get the Company Directory and People Finder built using all out of the box properties and settings in the Content Search Web Part.

Let’s watch a validation run. This is a test environment, so there are only two proper users in the User Profile Service.

And, as with many other posts in the Business Management series, there is more than one way to build this solution. You could use the standard Search Results web part too, which might need its Display Templates altered to get the information you want rendered, but comes with features such as “related people” and the Profile Hover Panel. Here you can see a screen shot using the standard Search Results web part with Name, Title, Department, “Ask me about”, Interests, and the hover panel with links to related data:

O365 SharePoint Search results company directory.

We’ll be able to watch Human Resources (HR) continue building out their sites over the next few posts.

 

 

Advertisements


Categories: Business, Business Management, Human Resources, Office 365 and O365, SharePoint

Tags: , , ,

1 reply

Trackbacks

  1. Office 365 and SharePoint – Human Resources (HR) Company Directory – User Profiles and Expertise Search Results Refiners – Westmorr Consulting

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: