Please post the actual HTTP request you're sending. Creating a task uses POST and a formal task definition. An update is a PATCH and requires only the fields you're changing. Given a 404 you're either using the wrong IDs or the wrong verb I'd wager. Posting the actual HTTP requests would help clarify that. Refer to the docs for an example request for update and try to see if that works for your new task.
Cannot update a ToDo item using MsGraph
I am trying to update a ToDo item using MsGraph.
I can create one using this URL
'me/todo/lists/TASKLISTID==/tasks
Json sent is
{"title":"Test new","dueDateTime":{"dateTime":"2024-07-17T00:00:00.000Z","timeZone":"UTC"}}
Works fine
But updating using this url with the same json fails
me/todo/lists/TASKLISTID/tasks/TASKID
Fails with a 404 and this message
{"error":{"code":"UnknownError","message":"","innerError":{"date":"2024-07-17T14:33:22","request-id":"a82fbb85-aac4-4988-b350-131d57a5c92e","client-request-id":"a82fbb85-aac4-4988-b350-131d57a5c92e"}}}
TASKID is correct
Note TASLKLISTID and TASKID are replaced with real values.
Getting the same result when I try it in MS Graph Explorer
Any ideas?
Dave Craggs
BTW - ChatGPT took me through all the obvious stuff!
2 answers
Sort by: Most helpful
-
-
David Craggs 0 Reputation points
2024-07-18T13:57:40.85+00:00 Changed the forward slash to a ? before the task ID and it worked
Sorry - No it didn't.