Get List of sonar users along with permission details

For some internal audit we would like to extract complete list of SonarQube users along with their permissions level.

We checked http://localhost:9000/api/permissions/users and it only gives details for global permissions. But we are trying to extract details of project permissions (user, admin, issueadmin, codeviewer, scan) as well so that we know permission each user in our system has.

And, http://localhost:9000//api/users/search only provides list of users without permission details.

We are using SonarQube 7.9. LTS with LDAP plugin and permissions are managed using AD groups. At the moment we have ~3500 sonar users.

Hi,

Welcome to the community!

There’s no single call for this; you’ve got a lot of iterating to do. You need to pull a list of all projects, and one of all groups. For each group, pull the list of members. Then you can iterate projects seeing which groups have which permissions, and which individual users. Note that the web services in question were written to feed the UI, so they return all groups and users - not just the ones with permissions - & you’ll have to check each node to see whether or it has rights.

 
Good luck!
Ann

A post was merged into an existing topic: How to get list of projects without admin users using API?