I am new to confluence. I just would like know how to get confluence licensed users count. Currently, our organisation has limit of 10000 users. And in this 4935 signed up users. I mean 4935 used. But when trying get count for licensed users from data base using following query I got only 2932. I am not understanding why both displaying different. Please let me whether I am using correct query or not getting licensed users count for confluence.
OR users.lower_user_name IN
u.directory_id = d.id
u.id = m.child_user_id
g.id = parent_id
Don't bother with the database, it's complex and you're looking at the wrong thing anyway.
Go to Admin -> Global permissions and get the list of groups that have "can use" in there. The members of those groups are the ones that give you the 4953 (note, that deduplicates users - if you're in three of the groups for example, you only count once to the 4953)
Thank you for response. But, I have different situation like I need to read the list of licensed users from data base. So, I google it and tried with multiple queries but mostly the results are getting below 3000. But, when I verify the count in Confluence Admin page it has 4900+ used licenses.
May be you are right, one user can have multiple licenses. because of that count is varying. But, I need total licenses used count using script. I don't have knowledge how to get that.
"I need to read from the database" does not explain what you are trying to do. It is almost certainly the wrong way to do it.
Instead of running off down the path of a probably complex and inaccurate solution, could you explain what you are trying to achieve instead?
Your original question was "I want to get the number of licenced users" and you then said you had 4935. Assuming that is from the Confluence system information, licence or user list pages, then it is already the answer. Why are you trying to replicate it using another method?
I am trying to create a console job to get the count of licensed users and need to notify the admins if count crossed certain limit. For that, I am trying to fetch the signed up users count and verifying count is crossed or not in console. But, my problem is I am unable fetch actual count that displayed in the admin page. Please let me know if you have other ways to read the count if it is not possible from database.
I am still not understanding why reading from database is not right way.
The database is not right because you are asking it the wrong question. Because it's messy and can't tell you the right answer unless you completely understand it.
Best way to do this would be to note what group(s) let you into Confluence (they rarely change once set up) and then get the list of users in those groups over the REST API
I've found the answer on similar question here https://confluence.atlassian.com/confkb/how-to-get-a-list-of-active-users-counting-towards-the-confluence-license-298978076.html
Hope, it will help you.
Jira is a great tool to use across different departments. Forget that paperwork – switch to Jira and get that tasks done smoothly. Marketing Jira allows for a complete digital transformation of you...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events