Forum Discussion
Graph API 1.0 - Listing lists doesn't return all lists (todoTaskList)
Hi, first time posting here, please let me know if I should be doing something differently!
I've searched throughout the internet and couldn't find a reason for this.
I've got a couple of users running into a problem where the https://learn.microsoft.com/en-us/graph/api/todo-list-lists?view=graph-rest-1.0&tabs=http endpoint only returns one list (Flagged Emails), though these users have and see many other lists in the To Do desktop (macOS) app.
I've confirmed in both cases it's the same user that's identified in my app/integration and in the desktop app. They can see the tasks in that list without a problem.
There are no errors requesting that list, and asking via `/users/{id|userPrincipalName}/todo/lists` also returns the same response (with that one list).
Is there any known situation where this could be happening? Am I missing something obvious? Is there something else I should be trying?
I've got many other customers using the To Do integration without a problem. I'm aware "My Day" and a few other special lists aren't returned.
Thank you so much!
6 Replies
- A_Software_DeveloperCopper Contributor
I have experienced the same issue retrieving Microsoft To Do list records through the Microsoft Graph SDK.
I have more than 50 lists.
I have observed that without a filter (StartsWith = ""), I get only "Flagged Emails" back.
If I use a filter like startswith(displayName, 'A') I get a list of lists with names beginning with "A".
If I use a filter like this:
startswith(displayName, 'A') OR startswith(displayName, 'B') OR startswith(displayName, 'C') OR startswith(displayName, 'D') OR startswith(displayName, 'E') OR startswith(displayName, 'F') OR startswith(displayName, 'G') OR startswith(displayName, 'H') OR startswith(displayName, 'I') OR startswith(displayName, 'J') OR startswith(displayName, 'K') OR startswith(displayName, 'L') OR startswith(displayName, 'M') OR startswith(displayName, 'N') OR startswith(displayName, 'O') OR startswith(displayName, 'P') OR startswith(displayName, 'Q') OR startswith(displayName, 'R') OR startswith(displayName, 'S') OR startswith(displayName, 'T') OR startswith(displayName, 'U') OR startswith(displayName, 'V') OR startswith(displayName, 'W') OR startswith(displayName, 'X') OR startswith(displayName, 'Y') OR startswith(displayName, 'Z')
I get only some of my lists. The list of lists returns in alphabetical order. At some point, the list just truncates and appends "Flagged Emails" to the end.
If I delete the OR startswith(displayName, 'T') filter, then the lists not shown in the previous (entire alphabet) search show up. It's as if removing lists that begin with "T" freed up space somewhere for the lists ignored in the previous search. (Lists starting with "T" are the most lists.)
I can get any list by filtering for an exact match on displayName.
I tried with and without pagination. Same results.
I log in as a consumer, with my Microsoft 365 account in a browser.
Trying to get a consistent response from Microsoft Graph is difficult. Removing lists with names that start with one letter affect Microsoft Graph results differently than removing a different letter. Like standing on a disc balanced on a sphere, I'm always compensating for one change but never getting back all lists.
Microsoft Graph 5.90.0
===============private async Task SignInAsync()
{
_credential = new InteractiveBrowserCredential(new InteractiveBrowserCredentialOptions
{
TenantId = TenantId,
ClientId = ClientId,
RedirectUri = new Uri("http://localhost")
});_graphClient = new GraphServiceClient(_credential, Scopes);
await LoadListsAsync();
}private async Task LoadListsAsync()
{
Lists.Clear();var response = await _graphClient
.Me
.Todo
.Lists
.GetAsync(cfg =>
{
cfg.QueryParameters.Filter = StartsWith;
}
);foreach (var list in response.Value)
{
Lists.Add(list);
}
}- brnCopper Contributor
Alright, so this worked in the cases where we were only getting one list. I'm hesitant to mark this as a solution simply because it seems clear it's a bug on Microsoft's systems, and this is a "hacky solution".
In any case, thanks a lot!
- A_Software_DeveloperCopper Contributor
My submission is an observation, not a solution, so please don't feel obligated to mark it as such. Hopefully somebody with a true solution finds this conversation!
I'm curious how Microsoft populates To Do with lists. Presumably they'd have fixed this issue if it affected them.I'm glad I was able to help.
- brnCopper Contributor
Thank you so much for sharing this! Unfortunately I didn't receive a notification for this reply, but will give it a shot now and see if it helps in my case! It's a shame the API doesn't return all stored regular task lists by default and we have to resort to these (incomplete) hacks.
The Microsoft Graph To Do API (v1.0) doesn’t return all task lists users see in the app—special or virtual lists like “My Day” and “Flagged Emails” are excluded by design because they aren’t stored as regular task lists. If users only see these special lists via the API, it’s expected behavior, not a bug. To access all standard personal task lists, ensure proper permissions and user context, and consider testing the beta API or checking for shared mailbox scenarios. Microsoft is gradually improving this, but full parity with the app isn’t there yet.
------------------------------------
Don't forget to mark as solution if my answer suits you- brnCopper Contributor
Thank you so much for the reply MrCharlesJenkins !
I'm aware those types of lists aren't available in the API, but we're talking about "regular" lists that the user has created in the To Do app directly. I've also checked for proper permissions and user context (it works for many other users), and this isn't on a shared mailbox, it's a "regular" personal account, and I've also tried using the beta endpoint with the same results.
Any other ideas?