Open
Description
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
SharePoint REST API
Developer environment
None
What browser(s) / client(s) have you tested
- 💥 Internet Explorer
- 💥 Microsoft Edge
- 💥 Google Chrome
- 💥 FireFox
- 💥 Safari
- mobile (iOS/iPadOS)
- mobile (Android)
- not applicable
- other (enter in the "Additional environment details" area below)
Additional environment details
- browser version
- SPFx version
- Node.js version
- etc
Describe the bug / error
SharePoint Online REST Search API requests with refinement values specified for managed properties ViewableByExternalUsers and ViewableByAnonymousUsers returns 0 records instead of expected number of records. Specifying ViewableByExternalUsers:True in query works fine, only using it as a refiner results in a problem. This used to work at least few weeks ago. Both managed properties are refinable.
Steps to reproduce
- Sent REST api serach request:
{"request":{"SelectProperties":["Filename","FileType"],"SortList":[],"RowLimit":0,"StartRow":0,"Properties":[],"QueryTemplate":"(ContentTypeId:0x0101*)" ","Refiners":"ViewableByExternalUsers(sort=name/descending,filter=1000/0/),ViewableByAnonymousUsers(sort=name/descending,filter=1000/0/)","TrimDuplicates":false}} - The response includes refinement values: [
{
"Entries": [
{
"RefinementCount": "754",
"RefinementName": "True",
"RefinementToken": "ǂǂ54727565",
"RefinementValue": "True"
},
{
"RefinementCount": "2448",
"RefinementName": "False",
"RefinementToken": "ǂǂ46616c7365",
"RefinementValue": "False"
}
],
"Name": "ViewableByExternalUsers"
},
{
"Entries": [
{
"RefinementCount": "315",
"RefinementName": "True",
"RefinementToken": "ǂǂ54727565",
"RefinementValue": "True"
},
{
"RefinementCount": "3921",
"RefinementName": "False",
"RefinementToken": "ǂǂ46616c7365",
"RefinementValue": "False"
}
],
"Name": "ViewableByAnonymousUsers"
}
] - Send another REST api call with refinement token:
{"request":{"SelectProperties":["Filename","FileType"],"SortList":[],"RowLimit":0,"StartRow":0,"Properties":[],"QueryTemplate":"(ContentTypeId:0x0101*)" ","Refiners":"ViewableByExternalUsers(sort=name/descending,filter=1000/0/),ViewableByAnonymousUsers(sort=name/descending,filter=1000/0/)","TrimDuplicates":false,"RefinementFilters":["ViewableByAnonymousUsers:ǂǂ46616c7365"]}}
The number of records returned is 0.
Expected behavior
Should return the number of records based on refinement value (token).