Forum Discussion
Graph API 1.0 - Listing lists doesn't return all lists (todoTaskList)
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);
}
}
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_DeveloperSep 09, 2025Copper 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.