Check user information API Rest SonarCloud

Hi everyone,

I have the next situation when I get the users information by API Rest of SonarCloud.

I have admin permissions in my organization (I get the users when I consulting the /api/organizations/search_members endpoint) passing a valid token and the name of organization in the payload of the request.

When I try to get information like groups, token_count, etc. (using the /api/users/search?q=login (or email) endpoint), this information is incomplete (only get the login, name, active, and anothers). The information is complete whe I use my login or my email.

And when I try get the tokens of an user (/api/user_tokens/search?login=) I get an “insufficient privileges” message.

So how can I get this information? I don’t know what more I need (I have all permissions).

Thanks for the support!

Hey there.

If you can see it in the UI – you can get the information! I suggest looking at this guide to help with your Web API adventures;

Hi Colin, thanks for your answer. I agree, but where I can get that information? (for the users). If I go to the members section, only can do is manage groups and remove form organization’s members.

I have this permissions, (as I explained, I have the incomplete information, or insufficient privilegies when I use the Web API):


Thanks for your time and support!

Hey there.

Thanks for the clarification.

Since SonarCloud users exist independently of SonarCloud organisations (a user can belong to many organizations, for example), not all of the information is available to organization admins. An example includes tokens: tokens exist at a user-level rather than an organization-level, and an organization admin doesn’t have the right to know how many tokens a user has that span many organizations.

The Web API docs could probably use an update here to reflect that nuance.

And, GET api/users/groups would be used to get the relevant groups for each user in your organization.

Thanks a lot, Colin!


Thanks for raising that issue with the API documentation. We clarified the behavior for the api/users/search endpoint.