Joice p j
Joice p j

Reputation: 1

Teams planner tab add using graph API error

POST: https://graph.microsoft.com/beta/teams/teamsId/channels/channelId

Request body

{
    "displayName": "Task  management",
    "[email protected]" 
    "https://graph.microsoft.com/beta/appCatalogs/teamsApps/com.microsoft.teamspace.tab.planner",
    "configuration": {
        "entityId": "",
        "contentUrl": "",
        "websiteUrl": "",
        "removeUrl": ""
    }
}
  1. entityId = plan id
  2. contentUrl = websiteUrl = removeUrl = https://tasks.office.com/{tenantName}/Home/PlannerFrame?page=7&planId={planId}

Graph API's docs referred

  1. https://learn.microsoft.com/en-us/graph/teams-configuring-builtin-tabs
  2. https://learn.microsoft.com/en-us/graph/api/teamstab-add?view=graph-rest-beta

But works fine if created using teams app or even update the same tab using settings.

Error message

Upvotes: 0

Views: 1172

Answers (1)

Tarkan Sevilmis
Tarkan Sevilmis

Reputation: 1508

Looking at the logs, the URL you are specifying for the contentUrl seems to be missing the "page=7" query parameter, which looks like the reason the page doesn't load.

Upvotes: 0

Related Questions