2
votes

Below is the request for adding web tab.

1)API ->

POST - https://graph.microsoft.com/v1.0/teams/{teamID}/channels/{channelID}/tabs

2)Body ->

{
    "name":"[TabName]",
    "teamsAppId":"com.microsoft.teamspace.tab.web",
    "configuration":
    {
        "contentUrl":"[WebURL]",
        "websiteUrl":"[WebURL]"
    }
}

3)Error->

 "code": "InvalidRequest",
          "message": "The navigation bind for the teamsApp was missing in 
               request."

Tabs API is said to be GA already hence I'm posting this question.

GA Announcement link :

https://developer.microsoft.com/en-us/microsoft-teams/blogs/better-organize-and-automate-the-microsoft-teams-experience-with-the-availability-of-the-microsoft-graph-apis/

Please help me resolve this issue.

2

2 Answers

2
votes

Please find the solution below.

As mentioned by Nick in the above answer V1.0 has teamsApp property which can be used to set tab types. In case of built in tab types ,set "teamsApp@odata.bind" property to "https://graph.microsoft.com/beta/appCatalogs/teamsApps/[Built In tab Id]"

Example Website tab, https://graph.microsoft.com/beta/appCatalogs/teamsApps/com.microsoft.teamspace.tab.web

Refernce: https://docs.microsoft.com/en-us/graph/teams-configuring-builtin-tabs, https://developer.microsoft.com/en-us/graph/blogs/30daysmsgraph-day-27-use-case-create-a-team/

0
votes

It's not a great error message. The root cause is that there's no teamsAppId property in v1 -- instead there's a teamsApp property. (Which is also there in beta, btw) See https://docs.microsoft.com/en-us/graph/api/teamstab-add?view=graph-rest-1.0 for details.