ClientModel.addClientScope() doesn't work in my customized EventListenerProvider

I am working on a customized EventListenerProvider. In this provider, I need to call method:
ClientModel.addClientScope() to add a clientScope to a client.

However, I found it doesn’t work even the method is called. I didn’t see any error in log, just doesn’t work.
ClientModel is an interface, so I guess it is because I didn’t add the proper jar into my project then there is no proper class implementation for this interface.
Then I checked in keycloak service, and see several implementation. Then I try to add all these jar as dependency into my project




But the new provider build with the above dependency still doesn’t work.
Anyone has idea which dependency I should add in order to make the method ClientModel.addClientScope() works ? Or did I miss something else ?


Finally figured out. The API works as expect. It is because the input clientScope instance actually comes from another realm with the same name …
Unfortunately, there is no any error, warn, info in this case, which makes the debug a little bit tough.