Forum Discussion
kikogeruk
May 28, 2024Copper Contributor
Create Tab call in Teams call for MS Planner showing all Tasks, not just from referenced Planner
Hi all, we are struggling with an issue POSTing to the "https://learn.microsoft.com/en-us/graph/api/channel-post-tabs?view=graph-rest-1.0&tabs=http" endpoint using Graph API. The calls succeed, but...
BenFromAkita
May 29, 2024Copper Contributor
I managed to get this working with the below request body:
{
"displayName": "<TABNAME>",
"email address removed for privacy reasons" : "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/com.microsoft.teamspace.tab.planner",
"configuration": {
"entityId": "tt.c_<CHANNELID>_p_<PLANID>_h_1717017031119",
"contentUrl": "https://tasks.teams.microsoft.com/teamsui/{tid}/Home/PlannerFrame?page=7&auth_pvr=OrgId&auth_upn={userPrincipalName}&groupId={groupId}&planId=<PLANID>&channelId={channelId}&entityId={entityId}&tid={tid}&userObjectId={userObjectId}&subEntityId={subEntityId}&sessionId={sessionId}&theme={theme}&mkt={locale}&ringId={ringId}&PlannerRouteHint={tid}&tabVersion=20200228.1_s"
}
}
I couldn't find reference to what the _h_1717017031119 is, but that as a static value seems to work for our use case. To get this, I used the get Tab endpoint to check a tab that we manually configured in Teams to the correct Planner.
GET /teams/{team-id}/channels/{channel-id}/tabs/{tab-id}
Hope this helps!