Api/permissions/search_templates should return users and groups


at the moment (Sonarqube 9.7.1) I have not found any other way than to manually check all permission templates to answer this simple question that may be part of a security audit.
What permission templates does a Sonarqube group belong to?

This would be easy if api/permissions/search_templates returned all users and groups
instead of just usersCount and groupsCount.


Hey @Rebse

There are Web APIs marked Internal, GET api/permissions/template_groups and GET api/permissions/template_users that you can use for this purpose.

Hi Colin,

ok, so it’s
api/permissions/search_templates to get all permission templates
then use /api/permissions/template_groups?templateName=xxx' in a loop for all permission templates to get the groups.

While this works api/permissions/search_templates returning the groups and users would be
much more comfortable.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.