Mass remove a user role from many user accounts before deleting

I am trying to delete a user role in dhis2 v2.36. I understand that I should remove the role from all the user accounts. I have over 900 users.
Is there an efficient way to remove a role from many users possible at once?

1 Like

Hi @abdimohammed

I have asked around a bit on this topic, and in the UI there is no easy way. And the easiest way to get an overview over all users associated with the user role you want to delete, is probably through the API, and then run a query in the SQL database to remove the reference between the users and the user role.

Do you have access to the SQL database?


1 Like

Is the User-Extended App 0.3.0 now available not supporting this? I am not 100% sure. @ifoche ?

Hi @Caroline,
I dont have access to the SQL database.


@jaime.bosque Sure, User-Extended app can do this. We’re actually about to release the 2.36-compatible version of it so from the next week on, it should be there ready for you to download and use it.


or if you don’t want to wait for the next week, you can use the latest published dev version from here:

but if you use that, please be aware that some things may not be totally working

1 Like

Thanks @ifoche, I will keep an eye on the release.

1 Like