How to get a list of all the active and inactive(disabled users) Personal Spaces
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs 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
Summary
This Knowledge Base article was written specifically for the Atlassian Server platform. Due to the Compare Atlassian cloud vs server, the contents of this article cannot be applied to Atlassian Cloud applications.
To get a list of all personal spaces bound to active and inactive(disabled) users.
Solution
This can be done by running the following SQL query directly against the database:
Personal Spaces for Active Users
1
2
3
4
5
6
7
8
9
10
SELECT DISTINCT s.spaceid,
c.user_name,
s.spacename,
s.spacekey,
c.active
FROM SPACES AS s
JOIN user_mapping AS u ON s.creator = u.user_key
JOIN cwd_user AS c ON c.lower_user_name = u.lower_username
WHERE spacetype = 'personal'
AND c.active = 'T';
Personal Spaces for Inactive(Disabled) Users
1
2
3
4
5
6
7
8
9
10
SELECT DISTINCT s.spaceid,
c.user_name,
s.spacename,
s.spacekey,
c.active
FROM SPACES AS s
JOIN user_mapping AS u ON s.creator = u.user_key
JOIN cwd_user AS c ON c.lower_user_name = u.lower_username
WHERE spacetype = 'personal'
AND c.active = 'F';
Was this helpful?