Sharepoint REST API - Querytext does not seem to be processed

Copper Contributor

Having a bit of a weird issue with one of the tenants and wondered if anyone else had come across it before....

 

If I run a query such as 

 

 

https://<sitename>.sharepoint.com/_api/search/query?querytext='contentclass:STS_Web contentclass:STS_Site -SPSiteURL:personal'&Properties='EnableDynamicGroups:true'

 

 

on some tenants I get a list of all sites which is what I am expecting. However, on one particular tenant I just get a list of everything. In fact from the XML return it seems to indicate that the Query Modification has not even been processed. I assume that there must be a difference on this particular tenant (other than them using Sharepoint for their core file storage; they do have a lot more resources than any of our other sites).... The XML returned states this

 

<d:element>
<d:Key>QueryModification</d:Key>
<d:Value>(FileExtension:doc OR FileExtension:docx OR FileExtension:xls OR FileExtension:xlsx OR FileExtension:ppt OR FileExtension:pptx OR FileExtension:pdf) (IsDocument:"True" OR contentclass:"STS_ListItem")</d:Value>
<d:ValueType>Edm.String</d:ValueType>
</d:element>

rather than this (which I get just changing the <sitename> above and pointing it to another client.

<d:element>
<d:Key>QueryModification</d:Key>
<d:Value>contentclass:STS_Web contentclass:STS_Site -SPSiteURL:personal -ContentClass=urn:content-class:SPSPeople</d:Value>
<d:ValueType>Edm.String</d:ValueType>
</d:element>

 Has anyone else had a similar issue or know what might be causing it?

 

-- EDIT

Just noticed that this client has an A5 license rather than an A1 which is what the others have. Is there something else I need to do to enable API access on A5?

0 Replies