ERROR CancelledByUser is returned incorrectly in some scenarios

Tatsiana Kamarova 26 Reputation points
2020-06-11T11:05:01.45+00:00

I am using ADALjs and Teams SDK to authenticate users and request some permissions.

So user clicks a button "Grant Consent" in my application, MSFT popup appears and there are three possible scenarios:

1) User closes the popup << MSFT always responds with "ERROR CancelledByUser", this is fine.

2) User presses Cancel button

Actual result: In some cases popup closes with the same message "ERROR CancelledByUser" as expected, but in ~50% of cases popup closes without any errors.

Expected result: Popup should always close with "ERROR CancelledByUser" message when user clicks Cancel.

3) User presses Accept button

Actual result: In some cases popup closes without any errors as expected, but in ~50% of cases popup closes with the same message "ERROR CancelledByUser"

Expected result: Popup should close without any error messages when user clicks Accept

9881-authentication-popup.png

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
12,676 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Marilee Turscak-MSFT 20,516 Reputation points Microsoft Employee
    2020-06-12T23:14:43.337+00:00

    Hi @komatat,

    I'm not sure if this is the same issue, but I've seen others report this when they did not call teams Initialization in the index. If it's working sometimes and not others this might be because some attempts are on web and some are on desktop.

    https://github.com/OfficeDev/microsoft-teams-library-js/issues/324

    Can you confirm if this seems related?