Send roles via muliple Keycloak Realms

Hello,

I have a multi realm setup in Keycloak. That is like this :

Realm A → in which we have all the users from our team

Realm B → in which we have all the users from other teams

Client A Realm → in which we have all the users from the client, and connects to the app.

Realm A has an identity provider in Client A and we can connect to our application just fine, and all the roles are mapped using the identity provider mapper.

We cannot make another identity provider for realm b in client A realm, but we still need access for users in realm b , so I did an Identity provider in realm A for realm B that can connect to our app via Client A realm. ( Because Client A realm has the client to connect to the app )

The connection is ok, but the roles are not mapped, and we cannot make role mappings.
Does anybody know how to map roles from realm to realm to realm?

Thanks!