Summary: We are facing an issue where when using Microsoft Graph Search API (https://graph.microsoft.com/v1.0/search/query); when using the ‘from’ property to skip items to get to a page; sometimes there are missing results from that page (e.g. 8 results even if ‘size’ is set to 10) or none at all (e.g. no hits resulting in a blank page).
We have found this on several different tenants we tested on and with different browser (Chrome, Edge). It can be replicated using Microsoft Graph Epxlorer with a simplified query. This seems to happen quite frequently and is resulting in a bad end user experience.
The queries are using only the basic listItem entitype. This is the example of the simplified query ->
We are trying to follow the documentation as explained here -> https://learn.microsoft.com/en-us/graph/api/resources/searchrequest?view=graph-rest-1.0
Tests we tried
Here are a list of different tests by simply updating the ‘from’ property in the query’s payload shown above.
E.g. When From = 0 we have 10 hits as expected.
And showing there are 20,837 results.
Then we go up to page 10 by changing the from property to 90 ->
And here also showing the 10 results correctly. The result count seems to still make sense, though it changed without changing the query.
Then another example to the next page 11 by changing the from property to 100 ->
And suddenly we have no results. Also the total count changed by a lot, though still a lot higher than 120 results so we expect to see results in any case. Thus suddenly this page has 10 missed results.
The behavior seem to happen at random pages, sometimes resulting in empty pages and sometimes missing results in certain pages e.g. showing 7 from the 10 results even though should be size = 10.
Is there a workaround for this or a way to ensure that results are always returned properly even if it results in a performance cost?