How to link to ToDo tasks?

Copper Contributor

I am using the Microsoft Graph API to fetch tasks from the ToDo application and I am having trouble when creating links to the tasks. Often tasks use their ID (provided by the Graph API) in the URL. But sometimes tasks (and lists) uses a shorter string that is not the ID in the URL instead. This data is not provided by the Graph API and there is no clear indication for why the ID is not used.

 

This causes broken links for tasks that uses the shorter string in the URL instead of the ID.
How should links to tasks be created based on the Graph API data?

Example of a task with the ID in the URL:

https://to-do.office.com/tasks/AAMkADkxZmFlZDc2LTBjYTMtNDcxYy1hNWJhLWEwMzM5NTE4N2QwZQBGAAAAAABt08W_g...

 

Example of a task with a shorter string in the URL:
https://to-do.office.com/tasks/l-2a2xpp6cie6/details

 

2 Replies
I would be grateful if someone "in the know" would help us out here: I'd like a solution to the broader problem of "how to make a URL to a task in MS To Do?"
I use PowerAutomate to extract the link. Not sure if Microsoft Graph will allow you to just directly pull the ID of the task. If it does you can just concatenate a url together. Mine looks like this
https://to-do.office.com/tasks/[id]/details
This looks very similar to what you have in your post.
It seems Graph allows you to get the real ID
GET /me/todo/lists/{todoTaskListId}/tasks/{taskId}

If I understand your question correctly it's that you are trying to pull the ID from the url. Have you tried pulling the ID in it's own request? You could then make a new variable.

Thanks