In this post lets looks at how to Authenticate a Website against Azure AD for doing end to end tests.

Visiting external websites is considered as an Anti-Pattern as per Cypress documents.. For logging in, Cypress recommends either Stubbing out the OAuth provider or using programmatic access to get the token.

When using the OIDC cookie based authentication with Azure AD

Original - Mine -

  • Cookie based login
  • JWT login