SharePoint Search Query Tool: InformationProtectionLabelId missing

The SearchQueryTool is an open source tool which helps to execute Search queries for SharePoint. This article explains how to find the special property InformationProtectionLabelId.

Weiterlesen „SharePoint Search Query Tool: InformationProtectionLabelId missing“

SharePoint search: Use the RefinementFilter property to avoid the 4096 characters limit of SharePoint search queries

Even after 5 years of SharePoint and O365 development I sometimes stumble across endpoints I did not know about. Quite often those endpoints are quite helpful.

In this case it was the  RefinementFilter property that can be added to SharePoint Search calls. Using this property you can ignore the query length limit of 4096 characters. This can be super helpful when querying huge collections of items.

Weiterlesen „SharePoint search: Use the RefinementFilter property to avoid the 4096 characters limit of SharePoint search queries“

SharePoint SearchQuery to get all .aspx pages

The following Search Query returns all possible .aspx pages:

FileExtension:aspx AND (ContentClass:STS_ListItem_WebPageLibrary OR ContentClass:STS_ListItem_DocumentLibrary OR ContentClass:STS_List_PublishingPages OR ContentClass:STS_Web OR ContentClass:STS_Site) AND FileType:html

The results also contains subweb homepages. For site collection homepages you need to load the homepage object from the site you are on using jsom or csom (one call per Site).

SharePoint Client Search: Load managed search properties

When you search in SharePoint or Office 365 content with the SharePoint JavaScript object model (JSOM) you need to explicitly load managed search properties. Otherwise all search results will only return the standard search properties.

Therefore you need to add all managed properties before you execute the search. This can be done by adding the managed properties to the keywordQuery-object.
Weiterlesen „SharePoint Client Search: Load managed search properties“