[keycloak-user] Keycloak Plugin: How to retrieve list of synced users form Federated LDAP in EventListener
Paul Edison
paul.finnedison at outlook.com
Wed Aug 14 04:37:51 EDT 2019
Hi,
I’m trying to write a plugin for Keycloak that should work (“export”) with the data of users that get created.
Currently writing it as a EventListerner Plugin that acts on adminEvents.
If a user is created in Keycloak itself in the local store this works fine.
With the event I get the "resourcePath=users/0958198e-7a5d-4fb3-9b1b-2481841bff3f"
and with that I can access the user:
> UserModel user = session.users().getUserById(<ID>, session.getContext().getRealm());
Thats fine – but with federation I got problems.
In the event of synchronisation I don’t get this information.
I only get the "resourcePath=user-storage/381a8a65-c425-487e-b14a-a1186fda5940/sync"
How would I get the users form that info?
Is there a way to get form the session the list of synced users form that ID?
And in best case a list of new users and only updated users?
Kind regards,
Paul
More information about the keycloak-user
mailing list