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” Click “Add Mapping” 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)”
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. 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.