deleteRoleMapping in provider is not being called

Hi,

We have created a provider for Keycloak (v22.0.3) and we have overwritten the vast majority of the methods of the class AbstractUserAdapter (AbstractUserAdapter (Keycloak Docs Distribution 21.1.2 API)). We are federating users and roles. We can get the users, the roles, the role mapping for a user and the list of users in a role through the provider. We can add users, add roles to users, etc. through the provider too.

But when we try to remove a role from a user, the Keycloak interface throws an error like this: “Could not remove the scope mapping Role not found”. There isn’t any error in the Keycloak logs. We have implemented the method deleteRoleMapping​ of the AbstractUserAdapter, but nobody is calling our method. This error occurs only with federated users. With a Keycloak User it works properly.

Are we missing something? Is posible that it’s a bug on Keycloak?

We have try the same functionality with groups (methods joinGroup and leaveGroup) and it works well.

Thank you very much