Microsoft Graph API: How to get url for Task in Planner?

TejasSutar 21 Reputation points
2022-08-30T06:42:26.58+00:00

I am using planner task API from Microsoft Graph APIs to get details of a task created in planner. Is there any way to Teams client URL for task from Graph APIs? In the API response I don't see any property like webUrl which can be seen for other resources. Does Microsoft provide URLs for planner tasks in Graph API? If it is not supported, can I build URL programmatically?

The task URL copied from Teams client appears to have below format:

https://teams.microsoft.com/l/entity/com.microsoft.teamspace.tab.planner/tt.c_{channel id}p{planner id}_h_1660906395123?tenantId={tenant id}&webUrl=https%3A%2F%2Ftasks.teams.microsoft.com%2Fteamsui%2FpersonalApp%2Falltasklists&context=%7B%22subEntityId%22%3A%22%2Fboard%2Ftask%2F{task id}%22%2C%22channelId%22%3A%22{channel id}%22%7D

The string 1660906395123 after h_ looks like some timestamp. Does anyone know what this timestamp is?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,449 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vicky Kumar (Mindtree Consulting PVT LTD) 1,166 Reputation points Microsoft Employee
    2022-08-30T09:37:39.81+00:00

    For your first question, this feature is not supported in team's channel,

    For your 2nd question, timestamp is nothing but time when you request API call for task in milliseconds. you can change it to readable format.

    hope I answer your question, please let me know if you need any other help.

    thanks

    ----------

    please don't forget to upvote and Accept answer if the answer is helpful--


0 additional answers

Sort by: Most helpful