IDP initiated login

Hi, I’m strugling with Keycloak “IDP initiated login” feature. I have application which context-root is /XYZ and servlet is mapped to url /XYZ/sso. I’m using Wildfly and Keycloak adapter is configured using Keycloak SAML subsystem. IDP initiated login works fine until it jumps to my app. After login it jumps to /ZYX/sso/saml and after that it redirects to /XYZ. This point it fails because that’s not right url for app servlet. It should redirect to /XYZ/sso. I tried to define relayState with value /XYZ/sso but no luck. I can see that relayState is passed to my app but it has no effect. Keycloak adapter doesn’t care about it and it always redirects to /XYZ, which is application context-root.

Thanks
Jarno