How to retrieve Bamboo Data Center user groups and the corresponding user directories from Bamboo Database
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Purpose
This article shows how to retrieve Bamboo Data Center user groups and the corresponding user directories from Bamboo Database.
Solution
Please find the below SQL query which can run in any supported Bamboo DB's ( MySQL , PostgreSQL , Oracle , MS SQL Server ).
SELECT
CG.GROUP_NAME,
CD.DIRECTORY_NAME
FROM
CWD_GROUP CG,
CWD_DIRECTORY CD
WHERE
CG.DIRECTORY_ID = CD.ID;
Sample Output
GROUP_NAME | DIRECTORY_NAME |
---|---|
bamboo_admin | Bamboo Internal Directory |
eng_admin_group | ldap |
sales_jira_team | Crowd |
The two table involved are
1) CWD_GROUP - This table stores the group information.
2) CWD_DIRECTORY - This table stores the directory information and can be linked to CWD_GROUP with the help of directory_id.