Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

List all space administrators


We are upgrading a confluence instance, and we would like to send all space administrators a mail asking them to validate the result on the staging server.

I'm wondering if there is somewhere a simple macro / plugin which provides this functionality.

3 answers

1 accepted

0 votes
Answer accepted

Hey Francis,

I found a way to get all space administrators for all spaces. Added it as a KB article here:

Modified the source from the link given by Diallo earlier. What I do notice though, is that the permissionHelper seems to be affected by this bug:

Which means that the permission checks via Velocity might not be accurate (I noticed that it seems to only fetch users that are members of confluence-administrators, regardless of individual permissions set in the space's permissions).

Anyway, do give it a try!



Thanks for it - we tried that one but ran into a performance issue. Expect to brew some cans of coffee when you have like 4000 users, and 90 spaces.


Regarding the performance issues of the atlassian KB provided macro.  I re-wrote it to drastically improve the performance of the macro by only iterating through the spaces and only getting the distinct administrators from each space.  Below is my new macro code which i thought i should share so that others can benefit from this:

## Macro title: Space Administrators
## Macro has a body: N
## Body processing: Selected body processing option
## Output: Selected output option
## Developed by: Andrew Frayling
## Modified by: Adam Barylak
## Date created: 21/03/2012
## Date modified: 7/23/2017
## Installed by: <your name>
## Macro to display a list of space administrators
## @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($spaces = $spaceManager.getAllSpaces())
<table class="aui aui-table-interactive">
<th class="confluenceTh">Space</th><th class="confluenceTh">Administrator(s)</th>
#foreach($spacer in $spaces)
#if (!$spacer.isPersonal())
<td class="confluenceTd"><a href="$req.contextPath/display/$spacer.key">$</a></td><td class="confluenceTd"><ul>
#set($administrators = $spaceManager.getSpaceAdmins($spacer))
#foreach($admin in $administrators)

Hi Adam,

Thanks for this update. 

Is there a way to add the email address after the space admin name ?



@David Change the line of $ to: 

<li>#usernameLink($ #if ($ (<a href="mailto:$">$</a>) #end</li>

Like David likes this

Thank you very much !

Great update Adam - much appreciated (we also had the problem in prod which the macro was timing out and would essentially cause the page to break).

I just came accross this discussion regarding this concern. Hope that helps.

That's cool. I need a distinct list of all space administrators in all spaces, but that's a small extention.


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

383 views 23 8
Join discussion

Community Events

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

Events near you