Hi @Anonymous ,
Thank you for reaching out to Microsoft Q&A for this question.
I understand that you are trying to implement pagination using SkipToken
when the response has > 1000 record count. For it, please see the link about Skipping records. According to it, in the REST API, the control is $skip
and is part of QueryRequestOptions
.
Thus, using the same code snippet as available in the question, you can use QueryRequestOptions
with QueryRequest
to include SkipToken
returned as shown below:
Console.WriteLine($"Total Records : {response.TotalRecords}");
Console.WriteLine($"Current read: {response.Count}");
while (response.SkipToken is not null)
{
request.Optionsrequest. OptionsuestOptions() { SkipToken = response.SkipToken }; //Include the SkipToken received with the QueryRequest
response = argClient.Resources(request);
Console.WriteLine($"Current read: {response.Count}");
}
The output from the above snippet looks as below:
For more details, see:
QueryRequest.Options Property
QueryRequestOptions Class
Please let me know if you have any questions.
---
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.