Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication via Microsoft Entra ID gives error #30484

Open
RobineSavert opened this issue Oct 29, 2024 · 2 comments
Open

Authentication via Microsoft Entra ID gives error #30484

RobineSavert opened this issue Oct 29, 2024 · 2 comments
Labels
stage: needs investigating Someone from Cypress needs to look at this

Comments

@RobineSavert
Copy link

RobineSavert commented Oct 29, 2024

Current behavior

We have tried for a week to implement the authentication with Microsoft Entra ID and finally got a bug with more info.

We do not want to connect with username/password, as we are not permitted in our company for obvious security reasons, so we have to use msal.loginRedirect or msal.loginPopup from the '@azure/msal-browser' package.

I attached the error in a print screen:

BrowserAuthError: redirect_in_iframe: Redirects are not supported for iframed or brokered applications.
cypress-error

So how can we authenticate using Microsoft without using password/username?

Desired behavior

Connect with Microsoft Entra ID without username/password

Test code to reproduce

       msalInstance.loginPopup(requestObj)
        .then(async loginResponse => {
          if (loginResponse.account != null) {
            await loginWithAzureAd(loginResponse, skipRetrySignIn);
            resolve(true);
          }
        }).catch(async (error) => {
          console.log(error)
       }).catch(() => {
          reject();
        })
      });

});

Cypress Version

13.15.0

Node version

18.19.0

Operating System

Windows 11 Pro 22631.4317

Debug Logs

No response

Other

No response

@jennifer-shehane
Copy link
Member

@RobineSavert We haven't investigated this authentication provider specifically. Many logins prevent running within an iframe, and this seems to be the case for this one, so I don't expect you can test the login in this manner with this provider.

@RobineSavert
Copy link
Author

RobineSavert commented Oct 29, 2024

@RobineSavert We haven't investigated this authentication provider specifically. Many logins prevent running within an iframe, and this seems to be the case for this one, so I don't expect you can test the login in this manner with this provider.

Ok Jennifer, thanks for replying! The problem is not actually testing the authentication but our whole app is behind the login, so we cannot test our app with Cypress without being able to log in..

@jennifer-shehane jennifer-shehane added the stage: needs investigating Someone from Cypress needs to look at this label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: needs investigating Someone from Cypress needs to look at this
Projects
None yet
Development

No branches or pull requests

2 participants