This article demonstrates how you can use the ShortPoint People Search connection to retrieve custom User Profile properties and display them on your page.
TABLE OF CONTENTS
- Prerequisites
- Step 1: Create custom property.
- Step 2: Make sure that your custom property is Indexed and is visible to Everyone
- Step 3: Open Classic features on SharePoint admin portal
- Step 4: Click on Open button under Search section
- Step 4: Click on Manage Search Schema
- Step 5: Click on Crawled Properties
- Step 6: When Crawled property appears, we can create Managed property.
- Step 7: Fill the name of Managed property (this name will be used in search query) and field type
- Step 8: Configure mappings to crawled properties
- Step 9: Make sure that the following checkboxes are checked for a Managed property
- Step 10: Now let’s retrieve user profile property with ShortPoint Connection.
- Step 10.1: Open ShortPoint page builder and select List component
- Step 10.2: Open Connect tab.
- Step 10.3: Select connection type: REST API
- Step 10.4: Fill REST API URL with following:
- Step 10.5: Update the REST API URL
- Step 10.6: Click on Connect button
- Step 10.7: Open Content tab
- Step 10.8: Fill content to display.
- Step 10.9: Click on Preview button to see the results
Prerequisites
- You are using SharePoint online (Office 365) environment
- You have a custom user profile property either synced from your Active Directory or created from SharePoint Online admin portal and you want to show it in ShortPoint using People Search.
Step 1: Create custom property.
If you do not have a custom user profile property follow the instruction in article How to Create Custom User Profile Property Using SharePoint Online
Step 2: Make sure that your custom property is Indexed and is visible to Everyone
Navigate to the Search and Policy settings ensure that you select the options as displayed below:
Step 3: Open Classic features on SharePoint admin portal
Replace the YourTennantName in the following url https://YourTenantName-admin.sharepoint.com with the name of your SharePoint online environment and open it in a browser.
Click on Classic features on the left menu section:
Step 4: Click on Open button under Search section
Step 4: Click on Manage Search Schema
Step 5: Click on Crawled Properties
Filter crawled properties by the name of your custom properties.
The crawled property name which we are searching for will be in the following format: People:YourPropertyName
If your custom property has just been created, most likely you will not be able to find crawled property for your field.
The crawled properties are created by SharePoint Search engine during the scheduled crawling process.
For SharePoint online User Profile crawling is scheduled to run every 6 hours (SharePoint Online Search)
For SharePoint on-premise you can configure the frequency of the crawl process running (SharePoint Search: manage continuous crawls)
Step 6: When Crawled property appears, we can create Managed property.
Managed property is a property which we can be retrieved by making a call to SharePoint Search REST API.
Click on Managed properties and then click on New Managed Property
Step 7: Fill the name of Managed property (this name will be used in search query) and field type
Step 8: Configure mappings to crawled properties
Step 8.1: Click on Add a mapping
Step 8.2: Fill the name of the crawled property which we are searching for and click on Find button
Step 8.3: Select property from the list and click OK
Step 9: Make sure that the following checkboxes are checked for a Managed property
Ensure that the following are enabled for the Managed property:
- Searchable
- Queryable
- Retrievable
And click OK button to create a property.
Step 10: Now let’s retrieve user profile property with ShortPoint Connection.
Step 10.1: Open ShortPoint page builder and select List component
Step 10.2: Open Connect tab.
Step 10.3: Select connection type: REST API
Step 10.4: Fill REST API URL with following:
<webSiteUrl>/_api/search/query?querytext=%27*%27&selectproperties=%27<ManagedPropertiesToRetrive>%27&trimduplicates=true&sourceid=%27B09A7990-05EA-4AF9-81EF-EDFAB16C4E31%27&clienttype=%27ObjectModel%27
Step 10.5: Update the REST API URL
Replace <webSiteUrl> with your website url and <ManagedPropertiesToRetrive> with names of managed properties which you want to retrieve in comma separated format
Step 10.6: Click on Connect button
Step 10.7: Open Content tab
Step 10.8: Fill content to display.
You can add value from managed properties from the dropdown which is located above top right corner of the content editor.
Step 10.9: Click on Preview button to see the results
After you have checked if everything works, press Insert to add the element to the page or Back to continue setting it up.
That's it! You can now retrieve any unique user profile property and show it on your SharePoint pages.
Related articles:
- Connection Type: People Search
- How to Show People From a Specific Department Using People Search Connection Type
- ShortPoint People Search: Upcoming Anniversaries and New Hire Configuration