Why does the last "next link" return an unsupported query error?

Zack Korman 5 Reputation points
2023-06-15T08:43:10.5233333+00:00

We are making a request to the graph api to get transitive members of a group. The response is paginated, returning 100 users per response, with a next link for the next page (as expected). However, when we query a group with exactly 200 users, we get the response on the first request including 100 users and a next link. We make the request to the next link, and we get a response with another 100 users and another next link. We then make a request to the next link and get a 400 error with Request_UnsupportedQuery and the message "Invalid search request."

As far as I can tell, this is just a bug in Microsoft's pagination (it shouldn't return a next link that fails, should it?). Is there any work around for this, rather than just doing some weird error handling? Ie any way to get Microsoft to not give me a next link that throws an error?

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-06-15T14:39:45.75+00:00

    Hi Zack Korman,

    Thanks for reaching out. To assist you better kindly provide the query where you are experiencing the issue. Does this issue occur when running the query for the same group or all groups? And is the behavior consistent?

    Thanks.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.