Share via

Create tasks over other user's To-do /Tasks

Riya Dhyani 35 Reputation points
2024-01-16T11:04:00.5566667+00:00

I want to post the tasks into some other user's to-do/tasks :- If I'm using POST /me/todo/lists/{todoTaskListId}/tasks endpoint then I'm able to create the task inside my to-do as well as inside my task section in ms365 . But when I'm trying to post it into other user's to-do /task via POST /users/{id|userPrincipalName}/todo/lists/{todoTaskListId}/tasks then I'm getting the following error : Can you please guide me as to how would I be able to create tasks/todo for other user and also How am I going to get the todoTaskListId for other user .

{
    "error": {
        "code": "invalidRequest",
        "message": "Invalid request",
        "innerError": {
            "code": "ErrorIncorrectRoutingHint",
            "date": "2024-01-16T10:15:51",
            "request-id": "3f66e469-60fa-400b-a3f6-1e7696fbb8d4",
            "client-request-id": "8e73f9b5-8cfd-a195-47db-40cfad5f945b"
        }
    }
}
Microsoft Security | Microsoft Graph
0 comments No comments

Answer accepted by question author

AsithwMSFT 1,520 Reputation points Microsoft External Staff
2024-01-27T20:23:46.2733333+00:00

@Riya Dhyani

are you using application permission access scenario to call the create task api ? (users/{id|userPrincipalName}/todo/lists/{todoTaskListId}/tasks)

According to the documentation application permission are not supported for the creating Task.

for more details

https://learn.microsoft.com/en-us/graph/api/todotasklist-post-tasks?view=graph-rest-1.0&tabs=http#permissions

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

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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