how can i get a listing of groups in confluence?

I want to generate a report that shows a listing of all groups in our Confluence instance.  Anyone done anything like this?

Thanks!

 

4 answers

This widget could not be displayed.

Hello Bob,

You can get a list of all group names by running a query against your database. For instance:

select group_name from cwd_group;

It's also possible to retrieve the directory name that this group comes from and other kind of information you might need.

Let me know if that helps! smile

Eduardo

This widget could not be displayed.
Davin Studer Community Champion Apr 21, 2015

You could do it with a user macro.

## Developed by: Davin Studer
## Date created: 04/21/2015
## @noparams
<ul>
#foreach($group in $userAccessor.getGroups())
    <li>$group</li>
#end
</ul>

Nice one, Davin! :)

This widget could not be displayed.

Thanks, Eduardo!  I'll give it a shot.

Bob

 

This widget could not be displayed.

similarly from the java api

public class MyClass extends ConfluenceActionSupport{
	private final UserAccessor useraccessor;
	public MyClass(UserAccessor userAccessor){
		this.useraccessor=userAccessor;
	}
	public String execute()
	{
		//do something with
		useraccessor.getGroups()
	}
}

 

 

Suggest an answer

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

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

155 views 2 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you