Using Todo.Lists["Tasks"] works for most queries but not for GetTodoTask

Peter Spiegler 1 Reputation point
2023-08-17T10:18:34.32+00:00

Describe the bug

The graph-endpoint "/me/todo/lists/{todoTaskListId}/tasks/{taskId}" is the only TodoTask endpoint that does not allow the usage of the "Tasks" shorthand for the todoTaskListId parameter. It returns an "invalidRequest: Parent folder specified does not contain a Task with given Id" Exception.

To Reproduce

Steps to reproduce the behavior:

  1. Go to GraphExplorer
  2. Sign In since the default User does not have any Tasks
  3. Add a Task in the defaultList if you have none
  4. Query all tasks in your list with the "https://graph.microsoft.com/v1.0/me/todo/lists/Tasks/tasks" endpoint
  5. Choose one and copy the Id
  6. Try to query this specific task by appending the taskId ("https://graph.microsoft.com/v1.0/me/todo/lists/Tasks/tasks/{taskId}")

Expected behavior

The TodoTask with the given Id found in the defaultList is returned.

Desktop:

  • OS: Windows 10
  • Browser: chrome
  • Version: 22

Additional context

  • I haven't tried all endpoints, but the endpoints "List Tasks", "List Task List", "Create Task", "Delete Task" and "Update Task" all work when using "Tasks" as the {todoTaskListId}.
  • The GetTask enpoint works without issue when using the id of the defaultList, it is only the "Tasks" shorthand that produces the error.
  • This happens both in the GraphExplorer and with the DotNet SDK.
  • Might not be a bug if this is intended behaviour, but if it is, I would like to know why?
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,507 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.