OIDC Troubleshooting for Entra ID configuration
OIDC 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
Error Screen After Entra Authentication - Application with Identifier
After Entra authentication you see a screen like this, containing text Application with identifier [string] not found in the directory.

Cause: As you can see error message, identifier has extra R character on beginning of it, so it doesn’t match Entra applications Application ID.
Fix: : Contact Matrix42 and provide the Application ID value.
Redirect URI Error After Entra Login
After Entra login you see screen like this:

Cause: The error message states that Redirect URI is not configured to application on Entra. It has not been configured at all, or there is a typo on that URI on Entra configuration.
(example in the screenshot: https://rikurestdemo20251.efectecloud-demo.com/auth/realms/rikurestdemo20251/broker/oidctest/endpoint)
Fix:
- Contact Matrix42 and request for your Secure Access' OIDC Identity Provider's
Redirect URI.
- Go to your Entra.
- Go to “
App registration”. - From the list, select your application that you use for OIDC login configurations.
- Select
Authentication.
- Under
Redirect URIsremove the faulty Redirect URI.
- Click
Add URI. - Add the correct redirect URI (this was copied on step 1.).
- Test again.
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.
Login Fails with "Wrong Audience from Token" Error on logs
If keycloak.log contains an error like this:
org.keycloak.broker.provider.IdentityBrokerException: Wrong audience from token.
Cause: The Client ID configured on Secure Access’ Entra Identity Provider does not exactly match the aud claim in the token issued by Entra. This is usually caused by a typo or extra leading/trailing whitespace in the Secure Access Identity Provider Client ID field, or by using the Entra Object ID instead of the Application (client) ID.
Fix: Contact Matrix42 and ask to verify the Client ID value on the Entra Identity Provider configuration character-for-character (case-sensitive, no extra spaces) against the Entra application’s Application (client) ID.
Table of Contents