getContext() in connector for new Teams

55 views Asked by At

When getting context from microsoftTeams.app.getContext(), a lot of values now seem to display ‘undefined’ in the new Teams where they show relevant values in Teams Classic. Notably for us the channelName value.

This seems to be the same regardless of using V1 or V2 of the javascript SDK. The only differences arise from using the new Teams, and reverting to Teams classic resolves the issues.   For these issues, notably the missing values from context, the functionality in the New Teams does not match the documentation provided by Microsoft, as can be seen in the following example. 

The Channel Name or channel displayName is defined as being available via context in the docs for TeamsJS v2 like so: MS docs displayName - v2

And TeamsJS v1: MS Docs display Name - v1

Source: https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/access-teams-context?tabs=Json-v1%2Cteamsjs-v2%2Cdefault#get-context-by-using-the-microsoft-teams-javascript-library  

However in practice, when requesting the values with either TeamsJS v1 or v2, the values as defined able return as ‘undefined’ Screenshot of actual response in new Teams - showing undefined

This seems to be an issue with the new Teams Client rather than the SDK, however after reaching out to Microsoft support directly, they have directed us here and are unable to help further.

Has anyone experienced the same, is there another method by which I can get these required values?

Also, saving a connector in new Teams seems to work only intermittently where in Teams Classic it works consistently.

I've attempted using TeamsJS v1 and V2 in Teams Classic and new Teams.

Everything works fine in teams Classic using V1 or V2, however switching to new Teams we cannot get the required values, nor does saving the connector work consistently.

Advice from Microsoft support so far has been to use Teams Classic (and advise all our clients to use Team Classic), however it seems this option will not be available to us as of 31st March when teams Classic will be auto-updated.

0

There are 0 answers