Using a custom user profile property for people search results scopes

The scenario is simple; what have configured people search and allowed that to search using a custom metadata property that is being populated into the user profiles from an external system like a BCS system. For this post I assume that the user profiles synchronization is up and running and that we added an extra profile property for example SubDepartment from an external system and people search is already configured. So here are the steps.

1- Make sure that the “Managed Metadata Service” is provisioned and running before you perform this procedure.

2- Once the initial full synchronization is completed we should check that the custom property is populated to the users profiles as expected.

3- Open the SharePoint central administration web site.

4- Create a new metadata property pointing to your custom user profile property.
Click “Metadata Properties”
clip_image002
clip_image003
clip_image004
Click “Add Mapping”
clip_image005
clip_image006
clip_image007
Select “People:SubDepartment” (This is the crawled property and you will never find it until you perform the initial full crawl of the users profiles) and then OK
Click “Allow this property to be used in scopes (check box)”
clip_image009

5- Once this is done and this is a very important step RUN ANOTHER INCREMENTAL CRAWL.

6- Now open your search center and select people search and search for anything just to display the results page.

Edit this page and then edit the refinements web part.
clip_image010
clip_image012
clip_image013
Enter the following text
<Category Title="SubDepartment" Description="Use this filter to restrict results to a specific organization" Type="Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator" MetadataThreshold="1" NumberOfFiltersToDisplay="4" MaxNumberOfFilters="50" SortBy="Frequency" SortDirection="Descending" SortByForMoreFilters="Name" SortDirectionForMoreFilters="Ascending" ShowMoreLink="True" MappedProperty="SubDepartment" MoreLinkText="show more" LessLinkText="show fewer"/>

7- Unckeck the check mark "Use Default Configuration"

8- Click ok twice and then the user will have the capability to restrict the results depending on the SubDepartment of the employee.

Happy SharePointing Smile