How to Get Entity ID for Creating Tabs in Teams Channel Using Graph API

Patrick 20 Reputation points
2024-05-28T18:35:27.8933333+00:00

I'm trying to add a tab to a Teams channel using Microsoft Graph API. I understand that I need the entity ID in the request body, but I'm not sure how to retrieve it.

Could someone please explain how to get the entity ID for a Teams channel? What specific API request should I use to obtain this ID? Any examples or links to documentation would be very helpful.

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

2 answers

Sort by: Most helpful
  1. AsithwMSFT 1,420 Reputation points Microsoft Vendor
    2024-05-29T05:58:49.7166667+00:00

    Hi Patrick

    you can get tab details from below API .

    https://learn.microsoft.com/en-us/graph/api/channel-get-tabs?view=graph-rest-1.0&tabs=http#http-request

    GET https://graph.microsoft.com/v1.0/teams/{id}/channels/{id}/tabs/{id}?$expand=teamsApp
    

    to add new tab

    POST /teams/{team-id}/channels/{channel-id}/tabs
    

    https://learn.microsoft.com/en-us/graph/api/channel-post-tabs?view=graph-rest-1.0&tabs=http

    0 comments No comments

  2. Yakun Huang-MSFT 1,320 Reputation points Microsoft Vendor
    2024-05-29T06:09:29.29+00:00

    Hi @Patrick

    I found these documents and hope they will be helpful to you.

    Screenshot 2024-05-29 105514

    User's image

    See the link for more information:

    https://learn.microsoft.com/en-us/graph/api/channel-post-tabs?view=graph-rest-1.0&tabs=http

    https://learn.microsoft.com/en-us/graph/teams-configuring-builtin-tabs#custom-tabs

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    0 comments No comments