How to get the number users and groups in Confluence Server and Data Center

Still need help?

The Atlassian Community is here for you.

Ask the community

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

Purpose

The number of users and groups, and the depth of nested groups can contribute to performance and other stability problems in your instance.  However, it can be difficult to find out the exact number of users and groups being synched from your LDAP directory, especially if you have nested groups. 

Solution

If you experience problems, or you want to make sure you don't exceed our recommended guardrails, you can use the following queries to check the total number users and groups. 

These queries have been tested with PostgreSQL, Oracle 12c, MySQL 8.0, and Microsoft SQL Server 2017.

Get the total number of groups

Use this query to find out the total number of groups in the instance. 

PostgreSQL, MySQL, Microsoft SQL Server, or Oracle
SELECT DISTINCT count(*) 
AS group_count 
FROM cwd_group 
WHERE directory_id in (SELECT id 
   FROM cwd_directory 
   WHERE directory_type in ('CROWD', 'AZURE_AD', 'CONNECTOR'))


Get the total number of users

Use this query to find out the total number of users in the instance.  

PostgreSQL, MySQL, Microsoft SQL Server, or Oracle
SELECT DISTINCT count(lower_email_address) 
AS user_count FROM cwd_user 
WHERE directory_id in (SELECT id 
   FROM cwd_directory 
   WHERE directory_type in ('CROWD', 'AZURE_AD', 'CONNECTOR'))




DescriptionGet the number users and groups in Confluence Server and Data Center
ProductConfluence

Last modified on Oct 4, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.