Forum Discussion

RobDiazMarino's avatar
RobDiazMarino
Copper Contributor
May 21, 2020
Solved

authentication.authenticate() opens in external browser tab instead of pop-up window on first call

Hi there,   We're developing an app for Teams and found a problem where the first time we call microsoftTeams.authentication.authenticate() in the Desktop app (both Mac and Windows) it opens the sp...
  • RobDiazMarino's avatar
    Jun 22, 2020

    The problem was that .initialize() method is not a synchronous operation.  Digging into the API docs shows that .initialize() takes a callback function as a parameter.  So wrapping this in a promise and chaining the authentication call to happen afterward fixed the problem.

Resources