4

Using SharePoint 2013 Rest API Search Service we need to get Custom Properties in SharePoint Online.

I used the following query get all user's user profiles properties

https://localhost/_api/search/query?querytext='*'&sourceid='B09A7990-05EA-4AF9-81EF-EDFAB16C4E31'&selectproperties='FirstName,LastName,OHPosition'

Result:

<d:element m:type="SP.KeyValue">
<d:Key>OHPosition</d:Key>
<d:Value m:null="true"/>
<d:ValueType>Null</d:ValueType>
</d:element>

From the above result I got value type is null, but this is String. Any one can you suggestions?

1

If you are using sharepoint 2013, when the creation of custom column, you must report that it should be searchable, so in their requests the values it appeared normal.

In this post has a more detailed about this.

http://www.sharepointalex.co.uk/index.php/2013/01/retrieving-values-of-managed-properties-in-sharepoint-2013-search-rest-api/

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.