Last Updated: Sep 24, 2024
Overview
When trying to Debug the Keycloak Application SAML 2.0 Addon, the following error is received:
access_denied: Cannot read property ‘endsWith’ of undefined
Steps to reproduce the error:
- Click on Keycloak Auth0 Application.
- Click on Addons.
- Click on SAML 2.0 (not disable, click on the text).
- Scroll down and click Debug .
- New page opens with error.
This article details why this error appears and how to get past it.
Applies To
- Keycloak Application
- SAML 2.0 Addon
- Debug
Cause
The error is coming from the Rule “Adding Roles to Access Token and ID Token”.
- user.issuer.endsWith(endsWith)
The issuer is undefined.
Solution
There is a misconfiguration in the rule. Disable the rule or add a null check to the line where user.issuer.endsWith(endsWith) is.