OfficeDev / microsoft-teams-library-js

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

New Outlook authentication does not occur in app #2467

Open bmedenwald opened 1 month ago

bmedenwald commented 1 month ago

The Bug in new Outlook (or this library)

When authenticating via this library, a small window within the app appears to collect user information. The below code will popup a window for authentication inside the app for old Teams, new Teams, and old Outlook.

But, the "new" version of Outlook does not work. It pops the user into a web browser, which cannot possibly work as the promise cannot be resolved in a different app.

import { authentication } from "@microsoft/teams-js";

onClick() {
  authentication.authenticate({ height: 625, url: this.localizedUrl(), width: 600 })
    .then(() => {
      alert("success");
    })
    .catch(() => {
      alert("error");
    });
}

Reproduction

To reproduce, simply head to AppSource and install the Simple In/Out application. If you are in any version of Teams or old Outlook, you'll see the popup "in app" correctly. But if you try to log in from new Outlook, you'll see yourself sent to a web browser in error.

I've also reported this here with no helpful workaround or solution.

ChetanSharma-msft commented 1 month ago

Hello @bmedenwald - Thanks for raising your query. We will look into it and let you know the updates.

lakhveerk commented 1 month ago

Hi Brandon, The is a known issue and currently being worked on. We will update you with the fix timeline soon.

krubenok commented 1 month ago

We have checked in a potential fix for this issue and expect it to roll out to production around the end of the Month.