Microsoft Graph Todo API doesn't return all task lists

Mo T 1 Reputation point
2021-10-18T19:14:45.733+00:00

The Microsoft Graph API does not appear to return all of my To Do Lists. It seems to return only the first 96 (determined alphabetically) and does not recover anything after that.

There is no nextlink -- even though the nextlink is properly surfaced when I limit $top=5 etc. Setting $top to a huge value does not fix the problem; the only returned data is only the first 96 To Do Lists.

Other users are also observing this behavior: https://learn.microsoft.com/en-us/answers/questions/270572/microsoftgraph-todo-api-only-returns-10-tasks.html

I should also add that the term $search does not appear supported by the API. I cannot even search for one of my To Do Lists that starts with the letter "Z", for example.

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

1 answer

Sort by: Most helpful
  1. ShivaniRai-MSFT 2,726 Reputation points
    2022-02-17T17:08:35.18+00:00

    Hi @Mo T ,

    I am able to replicate the issue. I have more than 100 todo lists but not able to fetch all even after using $top parameter.
    Then I tried using this Endpoint https://graph.microsoft.com/v1.0/me/todo/lists/delta and able to fetch all the lists. Using this Endpoint you can enumerate all the todo lists using the nextLink property.

    Example reference: refer below screenshot from Graph Explorer. With this Endpoint I am able to fetch all 110 todo lists:
    175523-image.png

    Reference Docs:
    https://learn.microsoft.com/en-us/graph/api/todotasklist-delta?view=graph-rest-1.0

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.

    0 comments No comments