Which users have access to a given space?

Ken Poulton February 26, 2025

For a given space, how can I list which users have access?

2 answers

2 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 26, 2025

Hello @Ken Poulton 

Welcome to the Atlassian community.

A Space Administrator can view the users and groups that have been granted access by going to the Space Settings page. You would have to look up each group to see who the members of the group are.

Are you looking for a more automated solution that will generate the list of individual users plus the members of groups that have been granted access?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 26, 2025

You might find this KB article helpful:

How to Check Permissions for a Space via SQL Queries 

Ken Poulton February 26, 2025

Yes, need this more automated and also ability to share with non-admins.

A macro that lists the users (including access via groups) for a given space would do the job.  Then I could put it on a page and restrict page access if needed.

Or a way to generate this list via Command Line Interface.

Stefan Stadler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 26, 2025

Hi @Ken Poulton 

if you are using ScriptRunner for Confluence, this could be done in a macro I think. 

I currently do not have a SR for Confluence available to try, but actually, you would have to get all the users:

Solved: Extract list of users who are part of "Confluence-...

Furthermore, you would have to combine it with the page permissions:

The code to get the permissions should be like this:

import com.atlassian.confluence.spaces.SpaceManager
import com.atlassian.confluence.spaces.Space
import com.atlassian.sal.api.component.ComponentLocator

def spaces = ComponentLocator.getComponent(SpaceManager).getSpace("SPACEKEY")
def spacePermissions = space.getPermissions()
spacePermissions.each{ permission ->
if (permission.getGroup() in <groupsOfUser>){
//Do something when user has access
}
}

Once you have all the permissions, you would have to check the users against it or check the groups of the user against it.

Unfortunately I do not have Confluence available to try, but this should be working.

Of course, the macro would have to create some kind of displaying structure such as a table or something like that...

Hope this helps!

Regards,

Stefan

 

0 votes
Aaron Geister_Sentify
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 26, 2025

@Ken Poulton 

Welcome to the community. I hope it finds you well. Let me try and help you answer this questions. 

First you will need access as a space admin or site admin to adjust the permission for users and groups. 
Please make sure you have correct permissions. Out of Box the permissions should be set to use the license group Confluence-users to add people to permission of spaces. If those are not availabed you can add users from the settings of the space permission and go to users or groups and start to add users and their selected permissions you want them to have. 

Here is some links to how permission work:
https://www.atlassian.com/software/confluence/resources/guides/get-started/manage-permissions#set-up-and-manage-space-permissions
https://support.atlassian.com/confluence-cloud/docs/what-are-space-permissions/


Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events