Impersonation not working when KC host != realm host

Hello,

I set the front-end URL of a realm to have a different domain than the one one that Keycloak is running under.

The issue is that when impersonating a user on that realm from the Keycloak’s admin UI I expect the users account management console running under that front-end domain to show up but I get redirected to the login instead.

There are no issues when the realm has no specific front-end URL configured.

I am guessing the issue is down to the fact that the impersonation request is issued from KC’s domain an not from the target domain so relevant cookies will not be sent to the realm’s account console which is running under a different domain.

Any help to get this to work would be appreciated - it’s a very nice feature to have available after all. Keycloak version is 16.1.

Thank you,

David