Filtering Users after last connection and other categories?

Hi,

currently I went through the existing users and wanted to delete those that have not been logged in for over two years. However I have to load every user first, press strg+f and look up “2 years” and then manually delete the users.

Isn´t there something in development to improve the UI, where you can filter after last connection for instance and choose multiple users for deletion?

Hi,

with the new web api v2 (available since Sonarqube 10.4) you may use
/api/v2/users-management/users

Get a list of users. By default, only active users are returned. The following fields are only returned when user has Administer System permission or for logged-in in user : ‘email’, ‘externalIdentity’, ‘externalProvider’, ‘groups’, ‘lastConnectionDate’, ‘sonarLintLastConnectionDate’, ‘tokensCount’. Field ‘sonarqubeLastConnectionDate’ is only updated every hour, so it may not be accurate, for instance when a user authenticates many times in less than one hour. The results are sorted alphabetically by login.

There are no builtin filters for that api, means you need to parse the json reponse on your own.

see
https://<yoursonarhost>/web_api_v2#/users-management/users--get

Gilbert

Hi Gilbert,

thanks for the information! I guess I will have to build with the API a script for my use-case

Melanie