I'm seeing this in Edge 42.17134.1.0 (April 2018 Update) (EDIT: but not in Chrome latest), using v0.1.5 of the MSAL npm package.
At line 1085 in the _UserAgentApplication.js_ file, I get a "Permission Denied" error.
I can get it to work by commenting out lines 1082-1088 and 1102 (closing brace) so that the window.opener-related checks are not run. I'm using a redirect login so I don't need this functionality (I assume it's used for the popup login flow).
Happy to help troubleshoot further but I'm still new to this library. Here's the relevant log output:
Level 2: Wed, 02 May 2018 16:50:40 GMT:0.1.5-Info Returned from redirect url
app-bundle.js (90,21)Unhandled rejection Error: Error invoking Auth. Check the inner error for details.
Inner Error:
Message: Permission denied
Inner Error Stack:
Error: Permission denied
at UserAgentApplication.prototype.handleAuthenticationResponse (http://localhost:9000/scripts/vendor-bundle.js:29168:14)
at UserAgentApplication (http://localhost:9000/scripts/vendor-bundle.js:28197:13)
at Auth (http://localhost:9000/scripts/app-bundle.js:84:13)
at invoke (http://localhost:9000/scripts/vendor-bundle.js:12189:7)
at invoke (http://localhost:9000/scripts/vendor-bundle.js:12153:7)
at invoke (http://localhost:9000/scripts/vendor-bundle.js:12424:9)
at get (http://localhost:9000/scripts/vendor-bundle.js:11870:11)
at get (http://localhost:9000/scripts/vendor-bundle.js:12351:11)
at Anonymous function (http://localhost:9000/scripts/app-bundle.js:234:13)
at tryCatcher (http://localhost:9000/scripts/vendor-bundle.js:3414:9)End Inner Error Stack
at invoke (http://localhost:9000/scripts/vendor-bundle.js:12426:9)
at get (http://localhost:9000/scripts/vendor-bundle.js:11870:11)
at get (http://localhost:9000/scripts/vendor-bundle.js:12351:11)
at Anonymous function (http://localhost:9000/scripts/app-bundle.js:234:13)
at tryCatcher (http://localhost:9000/scripts/vendor-bundle.js:3414:9)
at Promise.prototype._settlePromiseFromHandler (http://localhost:9000/scripts/vendor-bundle.js:2630:9)
at Promise.prototype._settlePromise (http://localhost:9000/scripts/vendor-bundle.js:2687:13)
at Promise.prototype._settlePromise0 (http://localhost:9000/scripts/vendor-bundle.js:2732:5)
at Promise.prototype._settlePromises (http://localhost:9000/scripts/vendor-bundle.js:2811:13)
at Promise.prototype._fulfill (http://localhost:9000/scripts/vendor-bundle.js:2756:13)
Note my edit above: this does not occur in Chrome, only in Edge with the April 2018 Update.
@LarsKemmann If the issue is only happening in a specific browser, it is out of scope for the library.
@LarsKemmann Can you paste the exact snippet of code where this error occurs in the UserAgentApplication.ts. In the latest release we have all the window.opener checks in the try catch except this:
https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/84278c4658a39f071cfd9f32df7692a87cc6de1c/src/UserAgentApplication.ts#L1399
Can you confirm if this is the line causing the issue.
Closing this issue because the OP has not responded to last comment. Please try the latest version of the library.