question

RakeshKumar-4431 avatar image
0 Votes"
RakeshKumar-4431 asked HunaidHanfee-MSFT commented

Adding a tab to meeting chat using the Microsoft Graph API fails with a 400 Bad Request

We are using below Microsoft graph end point to Add tab to specified meeting chat

 POST /chats/{chat-id}/tabs
 https://graph.microsoft.com/v1.0/chats/19:meeting_ZDVjYWE0ZTUtZDFmMy00ZWUzLTkyOTMtMWIzNjA3NTY2YWU3@thread.v2/tabs

Add tab to chat is not working for us. The response code is 400 Bad Request. Below are the request and response details.

Request

Request URL: https://graph.microsoft.com/v1.0/chats/19:meeting_ZDVjYWE0ZTUtZDFmMy00ZWUzLTkyOTMtMWIzNjA3NTY2YWU3@thread.v2/tabs
Request Method: POST
Status Code: 400 Bad Request

client-request-id: 5b5f2e49-f6fa-4c3a-8164-3f63cb7557a3
request-id: 7a65b1e9-5364-44ce-98f9-339294a65a40

Reuest Payload

 {
     "displayName": "Agenda",
     "teamsApp@odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/d3d1be68-066c-4967-a74b-9edcf902dcfb",
     "configuration": {
         "entityId": "decisions-chat-agenda",
         "contentUrl": "https://app.boarddecisions.com/teams/?theme={theme}&frameContext={frameContext}#/meeting-agenda?meetingId=19:meeting_ZDVjYWE0ZTUtZDFmMy00ZWUzLTkyOTMtMWIzNjA3NTY2YWU3@thread.v2",
         "websiteUrl": "https://app.boarddecisions.com/redirect?figgid=87a4aa31-4493-4bdb-a7b5-dfbd9db7a4c9&figgtenant=c7105dda-a548-4def-8ee7-e992e0e6dcb0&figgrealm=figg.onmicrosoft.com"
     }
 }

Response

 {
     "error": {
         "code": "BadRequest",
         "message": "App id d3d1be68-066c-4967-a74b-9edcf902dcfb needs to be installed to the scope 19:meeting_ZDVjYWE0ZTUtZDFmMy00ZWUzLTkyOTMtMWIzNjA3NTY2YWU3@thread.v2 and be in an unblocked state to install/update a tab",
         "innerError": {
             "message": "App id d3d1be68-066c-4967-a74b-9edcf902dcfb needs to be installed to the scope 19:meeting_ZDVjYWE0ZTUtZDFmMy00ZWUzLTkyOTMtMWIzNjA3NTY2YWU3@thread.v2 and be in an unblocked state to install/update a tab",
             "code": "InvalidRequest",
             "innerError": {},
             "date": "2021-09-09T08:57:34",
             "request-id": "7a65b1e9-5364-44ce-98f9-339294a65a40",
             "client-request-id": "5b5f2e49-f6fa-4c3a-8164-3f63cb7557a3"
         }
     }
 }

App is already installed to the meeting chat and we confirmed it by listing the installed apps in meeting chat using below endpoint.

Request

 GET
 https://graph.microsoft.com/v1.0/chats/19:meeting_ZDVjYWE0ZTUtZDFmMy00ZWUzLTkyOTMtMWIzNjA3NTY2YWU3@thread.v2/installedApps?$expand=teamsApp
 request-id: f3e8c883-d9ff-4946-8c24-59bedb540382
 client-request-id: e0057c12-cf3f-4045-b7cb-99268fc78bee

Response

 {
     "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#chats('19%3Ameeting_ZDVjYWE0ZTUtZDFmMy00ZWUzLTkyOTMtMWIzNjA3NTY2YWU3%40thread.v2')/installedApps(teamsApp())",
     "value": [
         ...,
         {
             "id": "MTk6bWVldGluZ19aRFZqWVdFMFpUVXRaREZtTXkwMFpXVXpMVGt5T1RNdE1XSXpOakEzTlRZMllXVTNAdGhyZWFkLnYyIyNkM2QxYmU2OC0wNjZjLTQ5NjctYTc0Yi05ZWRjZjkwMmRjZmI=",
             "teamsApp": {
                 "id": "d3d1be68-066c-4967-a74b-9edcf902dcfb",
                 "externalId": null,
                 "displayName": "Decisions",
                 "distributionMethod": "store"
             }
         }
     ]
 }











office-teams-app-devmicrosoft-graph-teamworkmicrosoft-graph-sdk
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

We are looking into this. We will get back to you soon.
Thanks

1 Vote 1 ·

I tried this and faced no issue doing it. Could you please try adding other app and see if you are facing the same issue.
Could you please also confirm that app is not blocked in Teams admin center (*see this*) and are you able to add tab manually?
Meanwhile I am looking internally to make it work.
Thanks

0 Votes 0 ·

We didn't heard back from you. Is there any update on this ? Are you able to resolve this?

0 Votes 0 ·

Hello @HunaidHanfee-MSFT, My apologies for the delay in responding. It has suddenly started working for us to add tab in the meeting chat.

In response to your questions, the app was not blocked, we were able to add the tab manually, but we were receiving a 400 Bad Request error when adding tab via the Graph API. This issue seems to be fixed now. I really appreciate your help!!

We have been facing this issue since 28 July 2021. Initially, we thought this issue was related to another issue, so we asked this question.
https://docs.microsoft.com/en-us/answers/questions/493106/graph-api-is-not-listing-all-installed-apps-in-a-t.html



0 Votes 0 ·

Thanks for updating, It's good to hear it is resolved. Let us know if you have any query.

Closing this issue internally.

1 Vote 1 ·

0 Answers