SAML Troubleshooting for Entra ID configuration
SAML Troubleshooting for Entra ID configuration
Troubleshooting
If you run across the issues described below, it is recommended to contact Matrix42 as some of the steps can only be done by at our end.
Username Shown in Weird Format on Portal
Example of this issue in portal, where username is a weird string and the circle has also number or weird character:

In ESS2 portal, missing/weird username mapper affecting UI is cannot be shown.
Cause: Username mapper missing or configured incorrectly.
Fix: Contact Matrix42.
Weird Username and/or Missing Email on Entra Authentication
After Entra authentication, you see screen like this, with weird username and/or email missing.

Cause: Username mapper missing or configured incorrectly.
Fix: Contact Matrix42
Login doesn't work and keycloak.log contains errors
If log contains error like this:
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Then issue is that Secure Access doesn't trust Entra certificates.
Follow this guidance https://docs.efecte.com/configure-authentication/download-and-install-certificates-to-secure-access-esa chapter "Add Microsoft related certificates to Secure Access" to install needed certificates to Secure Access and then try login again.
If log contains error like this:
com.efecte.epe.worker.entra.util.MicrosoftEntraProvisioningException: Exception connecting to MicrosoftEntra, HTTP code: 403
It usually means that you have not given enough API permissions on Entra or forgot to Grant admin consent for those.
After login you see screen asking username, email, firstname and lastname
If, by any chance, after using new button to login to Entra, below screen is visible on the screen, it means, ESA needs further configuration.

In order to pass the User from ESA to other systems (ESM, ESS, IGA) - ESA must be aware of context of the User. For that purpose, ESA stores a bit of metadata, describing each User which attempted to login.
Cause:
Screen above is showing, because ESA is unable to retrieve all of the needed data from Identity Provider (Entra) - and is asking the User to manually input all required data.
Fix:
https://efecte.helpjuice.com/admin/questions/configure-saml-authentication
Follow guidance on chapter: Configure mappers for Identity provider
Table of Contents