OfficeDev / microsoft-teams-library-js

JavaScript library for use by Microsoft Teams apps
https://docs.microsoft.com/microsoftteams/platform/
Other
432 stars 199 forks source link

.getContext() in connector modal returns 'undefined' #2160

Open courtney-zinco opened 9 months ago

courtney-zinco commented 9 months ago

Getting context from microsoftTeams.app.getContext() when setting up a connector, 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.   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: unknown

And TeamsJS v1: chatId The chat ID in the format 19  idl@thread skype, 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’ unknown

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.  

Meghana-MSFT commented 9 months ago

Thank you for reporting this, we will check this and get back to you.

dorukgunes commented 8 months ago

@Meghana-MSFT is there any update on this issue, we are experiencing the same problem and our users can not setup a configuration on the new teams client.

Can you please provide a way to get the channel name as a workaround until the issue got resolved ?

Meghana-MSFT commented 8 months ago

Apologies for the delay, we are checking this internally. We will get back to you.

pbylina commented 7 months ago

So basically, all the integrations that use the Connector will just stop working with the new Teams?

Meghana-MSFT commented 7 months ago

Apologies for the inconvenience caused to you. A bug has been raised for this issue, we will keep you posted on the updates. Thank you.

ayblanchet commented 7 months ago

I think lot of people wait this fix.

Kub-AT commented 7 months ago

Especially due to the fact that classic Teams are no longer the default

Meghana-MSFT commented 7 months ago

Apologies for the inconvenience caused to you. We are following up with engineering team for updates, we will keep you posted. Thank you.

ayblanchet commented 7 months ago

Hi @courtney-zinco @dorukgunes @Kub-AT, Have you tried saving the connector? When I call notifySuccess I'm forward to the connectors page but the connector it's not saved with teams V2. Thank you,

ramadis commented 7 months ago

we are experiencing the same issues. any updates or ETA @Meghana-MSFT? Could this be related to the app's manifest version?

courtney-zinco commented 7 months ago

Hi @courtney-zinco @dorukgunes @Kub-AT, Have you tried saving the connector? When I call notifySuccess I'm forward to the connectors page but the connector it's not saved with teams V2. Thank you,

Hi @ayblanchet - This seems to be the same behaviour as we are seeing. Attempting to save connector, call notifiySuccess() and being returned to connectors page but connector is not saved in new Teams. Very rarely it will work, but with no change in process from our side, just intermittent behaviour.

We have been informed by a Microsoft support representative that this issue and the issue listed above are being tracked by their development team and a fix is in the pipeline.

aykutbulca commented 7 months ago

@Meghana-MSFT, do you have any updates on this? We get user inquiries almost every other day about why they can't add new connectors in Teams v2. We guide them to use Teams v1 as the workaround, but how long do we need to do so?

There is a warning on Teams v1 stating that "Classic Teams will soon be unavailable for use", and if that happens before this issue is fixed, all the integrations that need the connector setup will stop working.

saraalmouaswas commented 7 months ago

Hi @Meghana-MSFT, this is an urgent issue for us. Our customers who have been migrated over to the new Teams application by their organization are no longer able to install our Connector.

Can you please provide an update on when your team will prioritize this fix? Alternatively, can you provide us with a solution we might be able to implement on our end?

melsener commented 6 months ago

hi, @Meghana-MSFT, any updates on this issue?

Meghana-MSFT commented 6 months ago

Fix has not reached public rings yet. We will keep you posted once the fix is available publicly.

dorukgunes commented 5 months ago

It's been more than 1 month since the last update, @Meghana-MSFT do we know the latest status for this ?

Meghana-MSFT commented 5 months ago

We are following up with engineering team for updates. We will keep you posted.

Meghana-MSFT commented 4 months ago

Engineering team has confirmed that the fix reached the latest client on June 14, client version 24051622220. This version has fix for the issue when setting up the connector. Could you please let us know if it's still a problem with the latest version.

melsener commented 4 months ago

hey @Meghana-MSFT thanks for the update. i am able to create a new connector using the channel name now. however, I am unable to update the connector, "Manage" button in the channel connector menu, opens up the initial URL (that is defined as configurationUrl in the manifest.

Although I am setting the correct configuration URL after creating the connector by calling pages.config.setConfig it looks like the contentUrl of the setting gets overwritten with the configurationUrl in manifest file. could you explain which property of the settings that "Manage" connector looks for? I assume that there's a missing element in the docs. Could you help us on this issue?

simplypixi commented 4 months ago

@Meghana-MSFT Still the same issue here, but this time it's related to team field. getContext result contains that field while setting up connector in web client, but not in the desktop app.

I did those tests on latest version of js library and desktop app.

// Web client Zrzut ekranu 2024-06-26 o 15 09 47

// Desktop Zrzut ekranu 2024-06-26 o 14 20 29

simplypixi commented 4 months ago

@Meghana-MSFT Could you give us an update on this? It's a big problem for us. We can't send our Teams connector changes to continue the review process without fixes for the API issues on your side.

Meghana-MSFT commented 4 months ago

@simplypixi - Could you please share the version details with us? Engineering team has tested this in latest version, and they see same behavior in web and desktop.

image

simplypixi commented 4 months ago

@Meghana-MSFT Sure :)

Zrzut ekranu 2024-07-8 o 15 35 15

However, I noticed that the app was auto-updated a few days ago, so I'll verify the issue again and let you know.

simplypixi commented 4 months ago

@Meghana-MSFT I'm happy to say that it works good now. 👌