How to get a list of active users counting towards the Confluence license

Still need help?

The Atlassian Community is here for you.

Ask the community

This article only applies to the Atlassian server platform. Learn more about the differences between cloud and server.


To know exactly which users count against your license in Confluence.

Confluence's license count is based on Global Permissions. Users will count towards the license in the following ways:

  • If the user is a member of a group that has global permissions to use Confluence
  • If the user is individually granted global permissions to use Confluence

Feature request

If you would like a function in Confluence that will enable you to check a list of active users automatically, please vote on this feature request:  CONFSERVER-54271 - Getting issue details... STATUS


Within the UI, you can get a listing of groups and users that are assigned Global Permissions by navigating to Confluence Admin > Global Permissions. You can find the groups via Confluence Admin > Groups to reveal their members.

Confluence 7.0.2 and later

If you're running Confluence 7.0.2 or later, you can write the list of licensed users to the application log. 

To obtain a list of licensed Confluence users:

  1. Go to  > General Configuration > Logging and Profiling.
  2. Add an entry for com.atlassian.confluence.user.DefaultUserAccessor  and set the level to DEBUG. 

  3. Tail your <home-directory>/logs/atlassian-confluence.log file. 
  4. Go to  > General Configuration > License details.
  5. Under Licensed users, choose Refresh

  6. In the log file, look for a line similar to the following:

    2019-09-17 10:36:34,271 DEBUG [read-only-transaction:thread-1] [atlassian.confluence.user.DefaultUserAccessor] getUserNamesWithConfluenceAccess Found 3 licensed users: [user1, user2, user3] 

See Configuring Logging for more information on changing the logging and profiling settings in Confluence. 

Good to know

  • This workaround may have a performance impact on your site. You should remove the com.atlassian.confluence.user.DefaultUserAccessor entry once you've successfully written the list of users to the log file
  • Usernames will be written to your logs in plain text. This may have privacy implications for your site. If you ever need to remove personally identifiable information you'll need to also remove it from the log files.  

Confluence 6.15.x and earlier

Solution 1

If you are using Confluence 3.5 to Confluence 6.15.x, you can use the following SQL queries to return a list of users that count towards the license.

Return users that belong to a group which has global permissions:

This SQL query may not return accurate results if you are using nested groups in LDAP or Crowd, or if you have users with duplicated usernames across multiple directories.

SELECT u.lower_user_name, d.directory_name
FROM cwd_user u
JOIN cwd_membership m ON = child_user_id
JOIN cwd_group g ON m.parent_id =
JOIN cwd_directory d on u.directory_id =
GROUP BY u.lower_user_name, d.directory_name
ORDER BY d.directory_name;

Return users that were individually granted global permissions:

SELECT u.lower_user_name, d.directory_name
JOIN user_mapping um ON sp.PERMUSERNAME = um.user_key
JOIN cwd_user u ON um.lower_username = u.lower_user_name
JOIN cwd_directory d on u.directory_id =
GROUP BY u.lower_user_name, d.directory_name
ORDER BY d.directory_name;

Solution 2

You may also use the following User Macro pulled from one of our Atlassian Community post to list down the users who are counted towards the license.

## Macro title: Last Login
## Macro has a body: N
## Body processing: Selected body processing option
## Output: Selected output option
## Developed by: Andrew Frayling
## Modified by: Michael Seager [Atlassian Support]
## Date created: 11/02/2012
## Installed by: <your name>
## Macro to display the last login date of users who have access to the current space
## @noparams

#set($containerManagerClass = $content.class.forName('com.atlassian.spring.container.ContainerManager'))
#set($getInstanceMethod = $containerManagerClass.getDeclaredMethod('getInstance',null))
#set($containerManager = $getInstanceMethod.invoke(null,null))
#set($containerContext = $containerManager.containerContext)
#set($loginManager = $containerContext.getComponent('loginManager'))
#set($users = $userAccessor.getUsers())

<table class="confluenceTable">
    <th class="confluenceTh">Count</th>
    <th class="confluenceTh">User</th>
    <th class="confluenceTh">Last Successful Login</th>

#set($count = 0)

#foreach($user in $users)
  ## list the last login date of users who can view the current space
  #if ($permissionHelper.canView($user, $space))
    #set($count = $count + 1)
      <td class="confluenceTd">$count</td>
      <td class="confluenceTd">#usernameLink($</td>
      <td class="confluenceTd">$action.dateFormatter.formatDateTime($loginManager.getLoginInfo($</td>

For more information on writing user macro, please refer to this documentation.


This article explains exactly which users count against your license in Confluence.

Last modified on Oct 21, 2019

Was this helpful?

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