Keycloak SPEL not working

I have a configuration as
container-env:
SHINYPROXY_EMAIL_ID: “#{keycloakUser.keycloakSecurityContext.token.email}”
it was working fine till sometime but now the pods do not have the environment variable. I am not sure what has changed and how to debug it. can anyone help me?

Hi

The settings seems correct to me. Can you check the following things:

  • check whether an e-mail address is set for this user in Keycloak
  • check whether keycloak passes the e-mail address of the user to ShinyProxy. Go to the client in the Keycloak admin interface. Click on Client Scopes, click the evaluate tab, select a user and click the Evaluate button. Next check whether access token and id token contain an email claim.

Which keycloak and shinyproxy version are you using?

Thanks for the response.
I have shared the token in the screenshot. The shinyproxy version is 2.6.0, keycloak version is 16.1.1
As I mentioned, everything was working fine but all of a sudden it stopped working.