Bulk removal of Users

Hi,

we plan to switch our authentication method for SonarQube (10.6, Enterprise on-Premise) from LDAP to SAML. To use this for a clean up of user accounts, we would like to remove all user accounts. The active users would then create a new one by logging in with SAML.
Removing a user needs 4 clicks, as we have ~200 users, that’s a lot of work.

Is their a way to remove all users (except the local admin) or at least several users at once?

Thanks!

Regards,
Carsten

Hi @Carsten_HB,

You can try to use the webapi to list all users and then disable / anonymize each user.

Hi @Bachri_Abdel ,

thanks for the hint towards the webapi. As “api/users/deactivate” is deprecated, I found the current option in the V2 API:

it still requires some scripting, as the (internal) ID can only be retrieved through the API, but it might still be an option.

Regards,
Carsten

1 Like

Thanks @Carsten_HB for the information. I don’t use 10.6 yet, we stay on 9.9 waiting for 10.9.