SQL query or any method to find out the users present in a space of confluence.
Asked by Mohammed Siyad:

Hi team,

Is it possible to retrieve the number of users per space that are granted access to in each space in confluence.

Or the number of users per group.

Thanking in advance


Answers:
author: Mohammed Siyad
body: [@Nicolai Sibler](/t5/user/viewprofilepage/user-id/2649119) [@AAMIR ANSARI](/t5/user/viewprofilepage/user-id/4992440) I am actually looking for a solution to get the extranet users tagged to a space, so that I can pull the results out space by space. Appreciating help!!

comments: author: Nicolai Sibler
body: [@Mohammed Siyad](/t5/user/viewprofilepage/user-id/5037049) Kindly specify what "extranet users" are and in what way they're "tagged" to a space.

Are we talking about a certain Confluence group and you want to know how many members this group has and in how many spaces this group has been granted space permissions?


author: Mohammed Siyad
body: This is what I was referring to where in we could find the users which have access to this specific space. If I can get the count of users to the specific space then it would be helpful.![extranet.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/227324iF36C54DBC4D6381B/image-size/large?v=v2&px=999 "extranet.PNG")


author: Nicolai Sibler
body: That *Extranet users* tab is generated by some 3rd party app. It's not a native Confluence functionality. If your Confluence Admin can't help you, reach out to the app vendor to find out what you need to know.


author: Nicolai Sibler
body: Hi [@Mohammed Siyad](/t5/user/viewprofilepage/user-id/5037049) ,

if you're interested in the plain number regarding a single space on the fly, you might use the *People who can view* function in the page menu on any unrestricted page.

Kind regards,

Nicolai

comments: author: Mohammed Siyad
body: Hi [@Nicolai Sibler](/t5/user/viewprofilepage/user-id/2649119)

I am looking to generate a report which returns the count of users tagged to a space (which might be individual permission or group permission).


author: Mohammed Siyad
body: <https://confluence.atlassian.com/confkb/how-to-check-permissions-for-a-space-via-sql-queries-717062216.html>

this doesnt get the count accurately as it is returning only the individual permission details [@AAMIR ANSARI](/t5/user/viewprofilepage/user-id/4992440)


author: Nicolai Sibler
body: Mohammed,

unfortunately, you have apparently not yet managed to define your requirement in such a way that it can be understood by other users here.

The *People who can view* infact is the count of users who can access a space (groups + users in the *Permissions* tab + Confluence Administrators).

The SQL Query provided by Aamir is returning groups and users in the *Permissions* tab.

Both options may not take into account the groups and users that are stored in your *Extranet* tab. I have already posted that you cannot expect any help in this case in this forum, since the tab is generated by a third-party app.

Regards,

Nicolai


author: Mohammed Siyad
body: [@Nicolai Sibler](/t5/user/viewprofilepage/user-id/2649119) Thanks for coming back, I undertand that extranet is a third part app and user list cannot be taken.

But is there any provision where we could get the count from the space who can view through a method or sql.


author: AAMIR ANSARI
body: Hi [@Mohammed Siyad](/t5/user/viewprofilepage/user-id/5037049)

Here is what you are looking for - <https://confluence.atlassian.com/confkb/how-to-check-permissions-for-a-space-via-sql-queries-717062216.html>

I hope this helps.

Thanks,

Aamir

comments: author: Mohammed Siyad
body: Is it possible to get the count of users who are active there? For say we have 5 groups tagged to a space and I need to get the count of users in that group which is unique (ie., the user might be part of multiple groups).

[@Nicolai Sibler](/t5/user/viewprofilepage/user-id/2649119) [@AAMIR ANSARI](/t5/user/viewprofilepage/user-id/4992440)


Tags: confluence-server

server