Adding Tab in Private Teams Private Channel

Khurram Shahzad 11 Reputation points
2022-09-21T15:33:59.553+00:00

Hi Everyone,

I am adding a tab to teams private channel using Graph API.

I have successfully add the tab in channel in case of standard Teams using the following Graph API source.

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

BUT when I try to add tab to a Private Teams channels its giving me following error.

"error": {
"code": "NotFound",
"message": "No active channel found with channel id: 19:374dd8a944d24ad6b12817750187fe82@thread.tacv2",
"innerError": {
"message": "No active channel found with channel id: 19:374dd8a944d24ad6b12817750187fe82@thread.tacv2",
"code": "ItemNotFound",
"innerError": {},
"date": "2022-09-21T12:55:49",
"request-id": "699ea61f-fcdf-4408-9c73-73bc2847cec2",
"client-request-id": "699ea61f-fcdf-4408-9c73-73bc2847cec2"
}
}

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,013 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,485 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,816 questions
{count} votes

5 answers

Sort by: Most helpful
  1. Dillon Silzer 54,281 Reputation points
    2022-09-21T15:41:11.073+00:00

    Hi @KhurramShahzad-1921

    Have you tried the entityID as 374dd8a944d24ad6b12817750187fe82 instead of 19:374dd8a944d24ad6b12817750187fe82@thread.tacv2?

    Documentation:

    Add tab to channel

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

    Example:

    POST https://graph.microsoft.com/v1.0/teams/{id}/channels/{id}/tabs  
      
    {  
      "displayName": "My Contoso Tab",  
      "teamsApp@odata.bind" : "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/06805b9e-77e3-4b93-ac81-525eb87513b8",  
      "configuration": {  
        "entityId": "2DCA2E6C7A10415CAF6B8AB6661B3154",  
        "contentUrl": "https://www.contoso.com/Orders/2DCA2E6C7A10415CAF6B8AB6661B3154/tabView",  
        "websiteUrl": "https://www.contoso.com/Orders/2DCA2E6C7A10415CAF6B8AB6661B3154",  
        "removeUrl": "https://www.contoso.com/Orders/2DCA2E6C7A10415CAF6B8AB6661B3154/uninstallTab"  
      }  
    }  
    

    -------------------------------------

    If this is helpful please accept answer.


  2. Khurram Shahzad 11 Reputation points
    2022-09-21T15:56:05.15+00:00

    Yes i tried and now its giving me following error.

    What i did i replace entityId in Place of id in this request.

    POST https://graph.microsoft.com/v1.0/teams/{id}/channels/{**id**}/tabs

    "error": {
    "code": "NotFound",
    "message": "Failed to execute Skype backend request GetThreadS2SRequest.",
    "innerError": {
    "message": "Failed to execute Skype backend request GetThreadS2SRequest.",
    "code": "ItemNotFound",
    "innerError": {},
    "date": "2022-09-21T15:55:16",
    "request-id": "17e5fcf8-9b7d-4829-a3e4-1c6eb6aaa445",
    "client-request-id": "17e5fcf8-9b7d-4829-a3e4-1c6eb6aaa445"
    }
    }


  3. Khurram Shahzad 11 Reputation points
    2022-09-22T08:00:55.867+00:00

    No its not working. I see tab is not being added even by using EntityId.


  4. Khurram Shahzad 11 Reputation points
    2022-09-22T10:45:19.733+00:00

    Hi @Prasad-MSFT ,

    Here are More details of error.

    Private Teams Standard Channel -- with ChannelId
    "error": {
    "code": "BadRequest",
    "message": "App id cb3e4e0c-0114-4e94-a2d3-9d61d7bd8a81 needs to be installed to the scope 1f8800f1-ffee-47be-92c6-4f49983b6d6f:19:422516bdb7214d659922f8ab4dbd7ae8@thread.tacv2 and be in an unblocked state to install/update a tab",
    "innerError": {
    "message": "App id cb3e4e0c-0114-4e94-a2d3-9d61d7bd8a81 needs to be installed to the scope 1f8800f1-ffee-47be-92c6-4f49983b6d6f:19:422516bdb7214d659922f8ab4dbd7ae8@thread.tacv2 and be in an unblocked state to install/update a tab",
    "code": "InvalidRequest",
    "innerError": {},
    "date": "2022-09-21T11:05:57",
    "request-id": "7656a856-8904-4614-958e-d988701d8999",
    "client-request-id": "7656a856-8904-4614-958e-d988701d8999"
    }}

    Private Teams Private Channel -- with ChannelId

    "error": {
    "code": "NotFound",
    "message": "No active channel found with channel id: 19:f9d0b389c04f4114bdf30de21c9eb9e5@thread.tacv2",
    "innerError": {
    "message": "No active channel found with channel id: 19:f9d0b389c04f4114bdf30de21c9eb9e5@thread.tacv2",
    "code": "ItemNotFound",
    "innerError": {},
    "date": "2022-09-22T10:37:54",
    "request-id": "625ec35d-0781-4d80-a8c8-40f88c18626c",
    "client-request-id": "625ec35d-0781-4d80-a8c8-40f88c18626c"
    }
    }

    Private Teams Standard/Private Channel -- with EntityId
    "error": {
    "code": "NotFound",
    "message": "Failed to execute Skype backend request GetThreadS2SRequest.",
    "innerError": {
    "message": "Failed to execute Skype backend request GetThreadS2SRequest.",
    "code": "ItemNotFound",
    "innerError": {},
    "date": "2022-09-22T10:35:36",
    "request-id": "b08a830d-6091-4c0b-af48-c6c69a719f50",
    "client-request-id": "b08a830d-6091-4c0b-af48-c6c69a719f50"
    }
    }

    Provided EntityId extracted from ChannelId.


  5. Prasad-MSFT 5,611 Reputation points Microsoft Vendor
    2022-09-22T12:06:23.907+00:00

    We tried to repro the issue and were able to add tab in private team's private channel successfully.

    1. Created a private team. Below is the list of channels of that team.

    243891-image.png

    2.Then tried to add the tab in that private channel and it got added

    243856-image.png

    Thanks,

    Prasad Das


    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.