Expand my Community achievements bar.

Aem Login form to authenticate against microsoft entra id

Avatar

Level 1
Level 1

I could achieve the saml login with microsoft entra id using IDP based login page.

My question is - If I want to design my own login page in AEM and do the authentication against microsoft entra id, what should be the steps?

Any working code examples will be really helpful.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

2 Replies

Avatar

Employee

Hello @SC1 

 

For AEMaaCS :

  • Keep the existing SAML integration on Publish

AEM Publish is Service Provider; Entra ID is IdP.

 

  • Use AEM custom page only as the entry UX, not for password handling

Custom login page is just a branded AEM page.

Actual authentication still happens on Entra’s login page (for security).

 

  • Create a custom AEM login page

- Example page: /content/your-site/en/login.html.

- Add your login component (HTL/HTML) to this page.

 

  • Trigger SAML from your AEM login page using /system/sling/login

- Use resource = a SAMLprotected path (under the SAML handler’s path, e.g. /content/your-site/en/secure/start.html).

- Use saml_request_path = final page after successful login.

  • Flow after clicking the button

- /system/sling/login => Sling picks SAML handler (because resource is protected).

- AEM generates SAML AuthnRequest → redirects to Entra.

- User logs in on Entra => SAMLResponse posted to /saml_login.

- AEM validates, creates/updates user, sets login-token cookie.

- AEM redirects to saml_request_path (your chosen “post-login” page).SAML 2.0 on AEM as a Cloud Service

 

  • Ensure dispatcher / CDN rules allow the auth endpoints

References :
https://experienceleague.adobe.com/en/docs/experience-manager-learn/cloud-service/authentication/aut...

https://experienceleague.adobe.com/en/docs/experience-manager-learn/cloud-service/authentication/sam...

 

Avatar

Level 1
Level 1

Hi @muskaanchandwani ,

 

I need the user to enter login credentials in the AEM login page instead of IDP login page.

Then with those credentials validate against my saml IDP.

Is there some guidance around it?