I have a task to change the status of users in the IDM. The solution I chose is naive: looping each one and calling KeyCloak's service using REST.
However, I've noticed that this consumes a lot of time. I thought that something like bulk update (equivalent to SQL) might solve the issue, but I didn't find it in KeyCloak's API.
Does anyone know how to fix it? Thanks for help!
Do you have access to Keycloak's database? If that's the case, you may update users' data with SQL sentences. The schema is pretty straightforward to understand, I've made bulk updates in this fashion before.
What do you mean by "status"? If you mean the "enabled" status, your update will look like this:
UPDATE user_entity SET enabled = (value) WHERE (your conditions)
AFAIK, there's no way to bulk update through REST or the admin console.
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With