I have built a custom Teams app with a static tab pointing to a SharePoint page.
the code for the tab in the app manifest is
"entityId": "mytab",
"name": "My Static Tab",
"contentUrl": "https://TENANT.sharepoint.com/sites/TARGETSITE/_layouts/15/TeamsLogon.aspx?SPFX=true&dest=https%3A%2F%2FTENANT.sharepoint.com%2Fsites%2FTARGETSITE%2FSitePages%2FTARGETPAGE.aspx",
"websiteUrl": "https://TENANT.sharepoint.com/sites/TARGETSITE/SitePages/TARGETPAGE.aspx",
"scopes": [
"personal"
]
All is working nice, authentication is done properly.
Now I want to perform some action on the page by deeplinking to the page with some parameter passed as subEntityId and reading the context's subEntityId in an SPFX webpart. According to
But unfortunately the value of subEntityId is always undefined.
The deep link would be
https://teams.microsoft.com/_?tenantId=e223420bb-edaf-792a-9dfd-961376a291ae#/apps/35cb66784-343b-4937-8980-9f38c47f737b/mytab?webUrl=https://TENANT.sharepoint.com/sites/TARGETSITE/SitePages/TARGETPAGE.aspx&context=%7B%22subEntityId%22:%20%22MY_PARAMETER_THAT_IS_NOT_PASSED%22%7D
Just linking to the static tab is working fine:
https://teams.microsoft.com/_?tenantId=e223420bb-edaf-792a-9dfd-961376a291ae#/apps/35cb66784-343b-4937-8980-9f38c47f737b/mytab
In both cases the tab is loaded and showing the SharePoint page, Teams-context is properly loaded, but subEntityId is always empty. How can I pass this parameter to my SPFx web part?