You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my app, I'm using the people API to return a list of relevant people to the logged-in user. I'm then taking the nextLink in the API response to request the remaining people, but this results in an infinite loop. After taking a closer look, I noticed that the skip param value in the @odata.nextLink URL is 0, which I believe is the culprit.
Steps to Reproduce
For brevity, I'm including code to get the initial nextLink response, but I can include my looping logic if needed.
The console should log https://graph.microsoft.com/v1.0/me/people?%24select=id%2cdisplayName%2cgivenName%2csurname%2cscoredEmailAddresses%2cphones&%24skip=0.
Expected behavior: The skip param in the @odata.nextLink URL should be offset by the number of returned results in order to request the following "page." If there are no more people to return, @odata.nextLink should be undefined.
Actual behavior: The @odata.nextLink URL in the response has a skip param of 0, thereby returning the same results in following requests and resulting in an infinite loop.
Usage Information
SDK Version - 3.0.7
Node (Check, if using Node version of SDK)
Node Version - 20.11.1
The text was updated successfully, but these errors were encountered:
Bug Report
Prerequisites
For more information, see the
CONTRIBUTING
guide.Description
In my app, I'm using the people API to return a list of relevant people to the logged-in user. I'm then taking the
nextLink
in the API response to request the remaining people, but this results in an infinite loop. After taking a closer look, I noticed that theskip
param value in the@odata.nextLink
URL is0
, which I believe is the culprit.Steps to Reproduce
For brevity, I'm including code to get the initial
nextLink
response, but I can include my looping logic if needed.The console should log
https://graph.microsoft.com/v1.0/me/people?%24select=id%2cdisplayName%2cgivenName%2csurname%2cscoredEmailAddresses%2cphones&%24skip=0
.Expected behavior: The
skip
param in the@odata.nextLink
URL should be offset by the number of returned results in order to request the following "page." If there are no more people to return,@odata.nextLink
should be undefined.Actual behavior: The
@odata.nextLink
URL in the response has askip
param of0
, thereby returning the same results in following requests and resulting in an infinite loop.Usage Information
SDK Version - 3.0.7
The text was updated successfully, but these errors were encountered: