context object returned in getContext() method of MicrosoftTeams SDK has subEntityId as "undefined"

691 views Asked by At

I have created deeplink by using microsoftTeams.shareDeeplink() method which takes subEntityId,subEntityLabel,subEntityWebUrl as parameters.

I tried to consume the deeplink created. According to the documentation provided, subEntityId can be retrieved back in the context when the link is followed and tab is reloaded by using microsoftTeams.getContext(). However the context object retrieved has subEntityId:undefined.

Even though the subEntityId has been provided while calling shareDeeplink(), context object does not contain subEntityId when deeplink followed.

Can somebody please help me on this.

url:

https://teams.microsoft.com/l/entity/385875ca-c900-4f42-9ba8-5bd45fa35bb9/aa13ec1b-376a-11e5-6767-2c337afbce1e?webUrl=https%3a%2f%2fwidget.parrot365.com&label=ui+workspace+1&context=%7b%0d%0a++%22canvasUrl%22%3a+%22https%3a%2f%2fp365.wittyparrot.com%3a3000%23%2fmain%3fsource%3dteams%26workspaceId%3daa13ec1b-376a-11e5-6767-2c337afbce1e%22%2c%0d%0a++%22channelId%22%3a+%2219%3a257ce3c0795a4477bb404d2c3db2b5a4%40thread.skype%22%0d%0a%7d&tenantId=fce50195-2315-47af-a684-ff91de5f9075

JSON object:

{  
   "channelId":"19:[email protected]",
   "entityId":"aa13ec1b-376a-11e5-6767-2c337afbce1e",
   "groupId":"ed9fa599-ca43-41c5-b500-6a09a2688a25",
   "isFullScreen":false,
   "locale":"en-in",
   "subEntityId":undefined,
   "teamId":"19:[email protected]",
   "theme":"default",
   "tid":"fce50195-2315-47af-a684-ff91de5f9075",
   "upn":"[email protected]"
}

Note: On calling shareDeeplink(subEntityId,subEntityLabel), according to the docs it should display dialog box containing a link with label as subEntityLabel. However it is displaying the link with label as entityLabel.

1

There are 1 answers

0
Rich Moe - Microsoft On BEST ANSWER

You mention calling shareDeeplink(subEntityId,subEntityLabel) but the right format is to use a JSON object as the parameter: shareDeepLink({subEntityId: subEntityId, subEntityLabel: subEntityLabel} )