How to identify list of active users in Bamboo
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
Summary
The purpose of this page is to provide a DB query which will help extract list of all active users in Bamboo.
Environment
The query has been tested on Bamboo 8.2.4 but will be applicable for all supported version. This query will work on all the DB versions available ( Oracle, PostgreSQL, MySQL , SQLServer )
Solution
SELECT USER_NAME,
FIRST_NAME,
LAST_NAME,
DISPLAY_NAME,
EMAIL_ADDRESS,
DIRECTORY_NAME,
DIRECTORY_TYPE
FROM CWD_USER U
INNER JOIN CWD_DIRECTORY D ON (U.DIRECTORY_ID = D.ID)
WHERE U.ACTIVE = 'T' AND D.ACTIVE = 'T';
SELECT DISTINCT USER_NAME,
FIRST_NAME,
LAST_NAME,
DISPLAY_NAME,
EMAIL_ADDRESS,
DIRECTORY_NAME,
DIRECTORY_TYPE,
PARENT_NAME AS GROUP_NAME
FROM CWD_USER U
INNER JOIN CWD_DIRECTORY D ON (U.DIRECTORY_ID = D.ID)
LEFT OUTER JOIN CWD_MEMBERSHIP M ON (U.LOWER_USER_NAME = M.LOWER_CHILD_NAME)
WHERE U.ACTIVE = 'T' AND D.ACTIVE = 'T'
AND M.DIRECTORY_ID = D.ID
ORDER BY USER_NAME,DIRECTORY_NAME,PARENT_NAME;