Skip to content

getAuthToken() is very slow and opens a popup window in Outlook in Firefox #3062

Description

@impworks

Consider a very simple Teams Tab app which just invokes msTeams.authentication.getAuthToken when the user clicks a button:

https://github.com/impworks/teams-js-firefox-bug/

When opening it in Outlook for Web in Firefox, the method would take 1.5..2s and a small empty pop-up window is briefly displayed in the process:

Image

The same page works instantly and without any popup in all other combinations of app and browser (takes less than 10 ms):

  • Teams Desktop
  • Teams for Web (Chrome)
  • Teams for Web (Firefox)
  • Outlook Desktop
  • Outlook for Web (Chrome)
  • M365 Copilot (Chrome)
  • M365 Copilot (Firefox)
Image

In our production application several components are requesting the token independently for their own purposes, which makes the window appear many times one after another, with some requests failing with very confusing errors due to a timeout. The exception is being originally thrown from this location in the SDK source code:

Image

And the inner error has the following data in it:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions