Assign a Planner to a Teams channel tab using Graph API is raising this error "Invalid bind property name teamsApp in request."

john john Pter 155 Reputation points
2024-02-22T23:17:57.5233333+00:00

I am trying to join the approaches mentioned in these 2 links:-   https://michelcarlo.com/2023/09/01/using-the-http-with-azure-ad-connector-in-power-automate-to-creat...

and

https://powerusers.microsoft.com/t5/Building-Flows/Flow-creates-team-channel-but-channel-is-hidden/t...   where i want to create a standard channel inside existing Teams + create a new Planner + show the new Planner inside the new channel tab.. here what i did so far:-  

  1. Get the Teams + create a standard channel:-   johnjohnPter_0-1708642703065.png  
  2. Parse the JSON and create a new Planner plan   johnjohnPter_1-1708642742792.png  
  3. Parse the json + get the Planner Id   johnjohnPter_2-1708642782119.png      
  4. Finally , show the Planner Plan inside a channel tab.   johnjohnPter_3-1708642841126.png   here is the body of the http request:-  
{
    "displayName": "@{triggerOutputs()?['body/Title']}",
    "teamsApp@odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/com.microsoft.teamspace.tab.planner",
    "configuration": {
        "entityId": "@{body('Parse_JSON_2')?['id']}",
        "contentUrl": "https://tasks.teams.microsoft.com/teamsui/{tid}/Home/PlannerFrame?page=7&auth_pvr=OrgId&auth_upn={userPrincipalName}&groupId={groupId}&planId=@{variables('PlannerID')}&channelId={channelId}&entityId={entityId}&tid={tid}&userObjectId={userObjectId}&subEntityId={subEntityId}&sessionId={sessionId}&theme={theme}&mkt={locale}&ringId={ringId}&PlannerRouteHint={tid}",
        "removeUrl": "https://tasks.teams.microsoft.com/teamsui/{tid}/Home/PlannerFrame?page=13&auth_pvr=OrgId&auth_upn={userPrincipalName}&groupId={groupId}&planId=@{variables('PlannerID')}&channelId={channelId}&entityId={entityId}&tid={tid}&userObjectId={userObjectId}&subEntityId={subEntityId}&sessionId={sessionId}&theme={theme}&mkt={locale}&ringId={ringId}&PlannerRouteHint={tid}",
        "websiteUrl": "https://tasks.office.com/{tid}/Home/PlanViews/@{variables('PlannerID')}?Type=PlanLink&Channel=TeamsTab"
    }
}

but on the last request i am getting this error:-   Invalid bind property name teamsApp in request.   any advice on this please? Thanks

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

1 answer

Sort by: Most helpful
  1. bizzo 0 Reputation points
    2024-07-22T15:22:47.5433333+00:00

    Did you ever figure this out? I stumbled upon this, and it didn't answer my question, but I think you're missing parenthesis and single quotes in teamsApp@odata.bind.

    I think this:

    "teamsApp@odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/com.microsoft.teamspace.tab.planner",
    

    Should be:

    "teamsApp@odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.planner')",
    

    Hopefully someone else stumbles upon this and can confirm (and hopefully this helps the next person, too!). 🤓

    0 comments No comments