OfficeDev / microsoft-teams-library-js

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

Teams apps not working with external (non-guest) users #2508

Open Tryptophan opened 2 months ago

Tryptophan commented 2 months ago

Hi dev team,

We want to be able to have teams users share an app added to a meeting with users within and external to their organization. According to the Teams documentation here: https://learn.microsoft.com/en-us/microsoftteams/apps-external-users#external-access-users this should be a supported method, but we have found that is not the case.

Expected behavior:

  1. User from host org creates and joins a meeting.
  2. That user adds an app to the meeting.
  3. User from external org (non-guest) joins the meeting.
  4. The external user can see the app icon to open the side panel view or can view the stage view share when the user from the host org shares. <-- This doesn't work.

When experimenting with this we found that Anonymous users can use apps in the meeting (both side panel and stage view sharing), this was accomplished by setting

"meetingExtensionDefinition": {
    "supportsAnonymousGuestUsers": true
 }

in the manifest, but even when this is set external users cannot access the app.

When external users are launched into stage view for a shared app, they see the following message: image there is nothing logged to the console in teams for any information on why this error occurs.

Both orgs have default teams settings, which allows for external access of meetings and interaction with apps in meetings.

The only way that I have been able to get external users to be able to interact with the host orgs apps in meetings is when I add them as a guest to a team in the host org, but this is not an ideal user experience as they would need to add every external user every time they wanted them to use the app.

Since this is a documented supported use case, I'm wondering why this doesn't work, please let me know if I am missing anything or if you are able to reproduce the same thing. This has been tested both on the web and native versions of teams with the same results.

From the docs linked above:

Users in the hosting organization can add apps in meeting chats with people from other organizations. People from other organizations can't add apps in meeting chats but can interact with bots, tabs and message extensions once added to the chat.
Meghana-MSFT commented 2 months ago

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

ChetanSharma-msft commented 2 months ago

Hello @Tryptophan - We are looking into your issue and let you know the updates.

Meghana-MSFT commented 2 months ago

@Tryptophan - We checked this issue by setting up this sample - https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/app-anonymous-users/nodejs

Below are the observations:

  1. External user(A user from another tenant and not added as guest in our tenant): Share to stage view is working for External user. User was able to see the stage view. image

  2. Anonymous user(A user with no Microsoft account login): Share to stage view is not working for Anonymous user. User is getting Can't show this content error popup. image

Based on the description above it seems like stage view is not visible to external users as well in your case.

Tryptophan commented 2 months ago

Hi @Meghana-MSFT , I don't see the (External) or (Unverified) tags on the users in the calls for the screenshot you provided. Which user in the first screenshot is the external user? The bottom user (MA)? Can you provide more detailed instructions on how you reproduced this? I tried cloning and running the repo you sent but got the same error I did before.

Meghana-MSFT commented 2 months ago

Yes, the bottom user MA is the external user.

  1. We did setup and ran the sample locally.
  2. Clicked the "Share Invite" button, copied the URL.
  3. Directly pasted it in incognito window and joined the meeting as an Anonymous user. When host clicked on share to stage view, it gave error pop up for Anonymous user. (Bottom user in 2nd screenshot)
  4. Shared the link with a user from a different Microsoft tenant who is not part of host's tenant (External user). When host clicked on share to stage view, user was able to see the stage view. (Bottom user in 1st screenshot)
ChetanSharma-msft commented 2 months ago

Hello @Tryptophan - Sorry for the inconvenience. Could you please share error logs or any specific code changes in the sample code via mail: microsoftteamsdev@microsoft.com

Also, please let us know if we can connect over Teams call to check on your issue quickly and resolve it as soon as possible. Please share your email details here microsoftteamsdev@microsoft.com so that we can connect. We work in IST time zone. (9:30AM-6:30PM), so please suggest your time accordingly to setup the call, if needed.

Tryptophan commented 1 month ago

Hi, I will try to reproduce with the steps you mentioned, but currently it's a bit lower on my priority. I will probably respond to this within 1-2 weeks. Please leave open until then, thank you.

RichieMcCaff commented 1 month ago

I imagine this is the same bug as described in the issue I raised.

It occurs for external users when they have the presenter role