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

1 vote

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

1 vote
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! :)

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

Bob

 

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

692 views 21 12
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