Problem statement
When I try to Debug the Keycloak Application SAML 2.0 Addon, I get the following error:
access_denied: Cannot read property 'endsWith' of undefined
Steps to reproduce
- 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 an error.
Cause
The error comes from the Rule “Adding Roles to Access Token and ID Token”.
user.issuer.endsWith(endsWith)
The issuer is undefined.
Solution
This is a misconfiguration in the rule. Disable the rule or add a null check to that line.