Paging in microsoft graph api

Ivan Kozikov 1 Reputation point
2021-03-10T13:54:48.407+00:00

Hi community.
We work on make integration of microsoft graph sdk into our service. And for our entities we make response as pageable with page size and page number and else.
As I see microsoft graph api use for e.g. only skip token. We try to parse it and also from documentation we see that in skip token encoded id of last element of returned page. Also we try to get count from groups endpoint but look like it's not work.

https://learn.microsoft.com/en-us/graph/api/group-list?view=graph-rest-1.0&tabs=http#request-2

response {
"error": {
"code": "Request_BadRequest",
"message": "$count is not currently supported.",
"innerError": {
"date": "2021-03-10T13:42:38",
"request-id": "4fa8171b-5e0e-4c16-b67b-0f116e2c9fc2",
"client-request-id": "4fa8171b-5e0e-4c16-b67b-0f116e2c9fc2"
}
}
}

So is any possibilities to transform paging from graph api with skip token to usual paging?
And what algorithm uses for encode skip token?

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

1 answer

Sort by: Most helpful
  1. Vasil Michev 95,666 Reputation points MVP
    2021-03-10T19:49:10.237+00:00

    You need to also add the ConsistencyLevel:eventual header for this query to work.

    0 comments No comments