'Planner Plan URL or creating a Planner Tab in Teams

I've been trying to create a plan using the Graph REST API for .Net and Microsoft Planner. Following the provided documentation, I was able to create a plan. However, I've seen that after creating it, no URL in order to access that plan is provided.

I was wondering if there was a way of getting or constructing this URL having the planId.

Following this, I also want to link the created Plan to a Tab in Microsoft Plan, but could not find anything useful in the documentation. Is there even a way to create a Planner Tab in Ms Teams using the Graph API?



Solution 1:[1]

The plans can be accessed to through this API:https://developer.microsoft.com/graph/graph-explorer?request=groups/%7Bid%7D/planner/plans&version=v1.0

Please refer this document:Top Planner API tasks

Solution 2:[2]

These are the documentation pages for adding tabs:

https://docs.microsoft.com/en-us/graph/api/channel-post-tabs?view=graph-rest-1.0 https://docs.microsoft.com/en-us/graph/teams-configuring-builtin-tabs

The URL for the Planner Tab page is as follows. You'll need to put your plan id there, but other variables in curly braces are part of the URL as variables, and get filled in by Teams when someone is viewing the tab.

https://tasks.teams.microsoft.com/teamsui/{tid}/Home/PlannerFrame?page=7&auth_pvr=OrgId&auth_upn={userPrincipalName}&groupId={groupId}&planId=<YourPlanId>&channelId={channelId}&entityId={entityId}&tid={tid}&userObjectId={userObjectId}&subEntityId={subEntityId}&sessionId={sessionId}&theme={theme}&mkt={locale}&ringId={ringId}&PlannerRouteHint={tid}&tabVersion=20200228.1_s

The full request looks like:

{
  "displayName": "<Name of the tab>",
  "[email protected]" :  "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/com.microsoft.teamspace.tab.planner",
  "configuration":{
      "entityId": "<combined channel and plan id>",
      "contentUrl": "https://tasks.teams.microsoft.com/teamsui/{tid}/Home/PlannerFrame?page=7&auth_pvr=OrgId&auth_upn={userPrincipalName}&groupId={groupId}&planId=<Your plan Id>&channelId={channelId}&entityId={entityId}&tid={tid}&userObjectId={userObjectId}&subEntityId={subEntityId}&sessionId={sessionId}&theme={theme}&mkt={locale}&ringId={ringId}&PlannerRouteHint={tid}&tabVersion=20200228.1_s"
  }
}

3 values need to be replaced there, the display name, the entity id and the plan id in the URL. The entity id value looks like

tt.c_<channel id>_p_<plan id>
For example for Channel ID = ABC, and Plan ID = 123, you'd get literal string
tt.c_ABC_p_123

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mehtab Siddique
Solution 2 Tarkan Sevilmis