question

SahiRepswal-9632 avatar image
0 Votes"
SahiRepswal-9632 asked HunaidHanfee-MSFT answered

Cannot get subEntityId on MS Teams tab app on button click

I have a card having buttons and on click on button, It is switching the tab and in url I have context having subEntityId. But I am not able to get subEntityId in context. Below is my JSON:

 "content": {
                     "title": "Test Button",
                     "text": "Test Button",
                     "buttons": [
                         {
                             "type": "openUrl",
                             "title": "Edit",
                             "value": "https://teams.microsoft.com/_#/tab::4f09546f-4adb-4395-87ec-86378e31fe72/Test?threadId=19:47f98dafd1924912bc65d9fca24703fe@thread.tacv2&ctx=channel&action=EditDeal&itemId=341708&context=%7B%22subEntityId%22%3A341708%2C%22action%22%3A%22EditDeal%22%7D"
                         }
                     ]
                 } 


Can you please help me to find out the cause of this?

office-teams-app-devmicrosoft-graph-teamwork
· 1
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 issue and will get back to you soon.

0 Votes 0 ·

1 Answer

HunaidHanfee-MSFT avatar image
0 Votes"
HunaidHanfee-MSFT answered

Hello,
Can you please try to build your link this way:
Encoded:

 https://teams.microsoft.com/l/entity/<app-id>/<entity-Id>?context=%7B%22subEntityId%22:%22<subEntityId>%22,%22channelId%22:%22<channelId>%22%7D

Decoded:

  https://teams.microsoft.com/l/entity/<app-id>/<entity-Id>?context={"subEntityId":"<subEntityId>","channelId":"<channelId>"}

Important notes:

  • Please make sure that you are entering the correct entityId.

  • channelId is not required in case of static tabs.

  • Please have a look at Create deep links and Get context for your tab.

  • If issue isn't resolved, please let us know.

Thanks,

Hunaid



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.


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.