SharePoint People Search with custom AD Properties

If you have a custom AD property and it is mapped to user profiles, but if you would like to search people with that property, you should follow the SharePoint search syntax.
The syntax is PropertyName:Value 
Ex: DeskNumber:D005

Problem with this is that
  1. You must follow the syntax
  2. You can not search for part of the value, it should be full-text value.


Quick Solution:
There is a quick tricky solution to come out of this drawback.


1. Open People search page (as administrator)
2. Click Edit page from settings gear.


3. Edit the People Search Core Results web-part

4. Click Change query button

5. In the Query text box: 
Put all of your combinations: starts with, end with etc., with OR/ AND logical conditions.

contentclass=SPSPeople {searchboxquery} OR MyCustomProperty1:A{searchboxquery} OR MyCustomProperty2:{searchboxquery}A OR MyCustomProperty1:{searchboxquery}  OR MyCustomProperty1:AB{searchboxquery}

6. Click OK, save and check-in the page; you are done!


Hope it helped you:) thank you

Comments

Popular posts from this blog

SharePoint Online (O365) OAuth Authentication | Authorizing REST API calls against SharePoint Online Site | Get Access token from SharePoint Online | Set up OAuth for SharePoint Online Office 365

SharePoint 2013 REST API Reference

Simple Risk Assessment Matrix table with resultant risk calculation

Kendo UI (Core JavaScript) grid Server Paging, Server Sorting and Server Filtering with Dynamic SQL queries

Sharepoint- Using an Image From formatmap32x32.png in a Ribbon Control