Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK login not working in New Teams for GCC High customers #2329

Open
Happy202121 opened this issue May 16, 2024 · 16 comments
Open

SDK login not working in New Teams for GCC High customers #2329

Happy202121 opened this issue May 16, 2024 · 16 comments

Comments

@Happy202121
Copy link

Hello,

We discovered that, for GCC High customers, the Teams JS SDK authentication module in is not working the same with New Teams as it does with Teams Classic.

In Teams Classic, the GCC High user opens our app, clicks a sign-in button, then an embedded browser opens to handle the authorization and authentication.

In New Teams, the GCC High user opens our app, clicks a sign-in button, then the default browser opens a new tab to try and handle the authorization and authentication. The resulting request has the wrong cookies and fails as a result.

Here's what we're using:

microsoftTeams.authentication.authenticate({
url: loginUrl, width: 820, height: 620, successCallback: function(result) {
console.log('Login Successfully: ' + JSON.stringify(result)); that.reloadUserContext(); }, failureCallback: function(reason) {
console.log('Login failed: ' + reason);

@jekloudaMSFT
Copy link
Contributor

Hi @Happy202121, I'm sorry you've run into this. Can you please share the microsoft-teams-library-js version your app uses?

@KaratLee
Copy link

@jekloudaMSFT @Happy202121 microsoft-teams-library-js version: @microsoft/teams-js@1.8.0

@jekloudaMSFT
Copy link
Contributor

Hi @Happy202121 @KaratLee, I haven't been able to reproduce this issue with my own Teams application. Could you please follow the instructions here to enable client side logging and then reply to this with the client logs you see when the auth page is opened in the browser? Can I also know if you receive a Login Successfully: or Login failed: log when this occurs?

@KaratLee
Copy link

KaratLee commented May 21, 2024

@jekloudaMSFT We got a prompt that the URL could not be opened: Login failed: URL was unable to be opened in embedded browser. (Use Microsoft gov account to access Zoom For GCCH)
Cc @Happy202121

@KaratLee
Copy link

KaratLee commented May 22, 2024

@jekloudaMSFT This is the installation package used by Microsoft gov environment customers. If you use the Microsoft gov environment account to access any app on the Microsoft Teams new client, you should be able to see this problem.

@KaratLee
Copy link

Hi @jekloudaMSFT is there any progress on this?

@jekloudaMSFT
Copy link
Contributor

Hi @KaratLee, I'm still investigating this issue and will raise it with Teams. Based on the logs, I suspect the issue may be a CSP violation causing the site to open in browser vs a new Teams window. Since the Teams URL for GCC high is gov.teams.microsoft.us, does gov.teams.microsoft.us need to be added to the frame-ancestors allowed by https://applications.zoomgov.com?

@KaratLee
Copy link

@jekloudaMSFT Thanks for your response. We'll try your suggestions, but this process works fine in Microsoft Teams classic

@KaratLee
Copy link

KaratLee commented May 31, 2024

Hi @KaratLee, I'm still investigating this issue and will raise it with Teams. Based on the logs, I suspect the issue may be a CSP violation causing the site to open in browser vs a new Teams window. Since the Teams URL for GCC high is gov.teams.microsoft.us, does gov.teams.microsoft.us need to be added to the frame-ancestors allowed by https://applications.zoomgov.com?

@jekloudaMSFT We followed your suggestion, but the problem is not solved. Can you help check it?

@KaratLee
Copy link

KaratLee commented Jun 3, 2024

@jekloudaMSFT Any updates?

@jekloudaMSFT
Copy link
Contributor

Hi @KaratLee thanks for the update, I will try to repro in GCCH environment and get back to you. Do you know what the source of the ERR_CONNECTION_REFUSED and 500 (Internal Server Error) errors is? I'm asking because it looks like they're occurring after Teams tries to open the new window

@KaratLee
Copy link

KaratLee commented Jun 5, 2024

@jekloudaMSFT
The 500 error appears before clicking login, so it should not be related to the current problem.
image

@jekloudaMSFT
Copy link
Contributor

Hi @KaratLee, thanks for your patience. I was able to repro the issue with a test app in the GCCH environment. I'm raising this with the Teams team and will provide another update soon

@KaratLee
Copy link

Thanks, looking forward to the update notification.
Cc. @Happy202121

@jekloudaMSFT
Copy link
Contributor

Hi @KaratLee @Happy202121, the Teams desktop team is working on a fix for this. I'll let you know when we have an ETA on the fix being available.

@Happy202121
Copy link
Author

Thanks @jekloudaMSFT, do you know which Teams client version will include this fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants