What is skipToken in QueryRequestOptions

Rufeng Xu-Friedman 21 Reputation points

Hi I am using ResourceGraphClient, the default returns 1000 records.

The document says it could return up to 5000, and it can be controlled by options with top, skip and skipToken.

How do I get skipToken ?

Here is the link I am referring to ?

With az graph, I can get default 5000 records. But I do not know how to get 5000 records with sdk ResourceGraphClient ?

Could someone please give me an example ?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,126 questions
0 comments No comments
{count} votes

Accepted answer
  1. Diana Wanjuhi 1,376 Reputation points

    Hello @Rufeng Xu-Friedman Thank you for reaching out. When a result set spans multiple pages, Microsoft Graph returns an@odata.nextLink property in the response that contains a URL to the next page of results . This will look like this:


    You can retrieve the next page of results by sending the URL value of the @odata.nextLink property to Microsoft Graph. Depending on the API that the query is being performed against, the @odata.nextLink URL value will contain either a $skiptoken or a $skip query parameter. The URL also contains all the other query parameters present in the original request. Do not try to extract the $skiptoken or $skip value and use it in a different request.

    From the documentation you shared, the Query Response contains the skiptoken property which can be passed on to subsequent requests. In your case, the response containing the first 1000 records will contain this value that you can use to get the next page of results.

    Let me know whether this helps and if you have further questions,


    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Rufeng Xu-Friedman 21 Reputation points

    Thank you so much !
    I understand now. The value $skiptoken is the response. I wish the document says something about it, as I could not understand what $skiptoken means. The doc only says "str". It would be better if it mentions that this is one the parameter from the return response.

    Thanks for your response.

    0 comments No comments