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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • 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

How do I get a list of active Confluence users through the Rest API?

Deleted user Dec 23, 2016

All of our users are in confluence-users so that's a simplifying assumption we can use. I wrote a script to pull out all the users using <url>/rest/api/group<group name>/member and I certainly got a list.

To my chagrin I discovered that the list makes no distinction between Active and Inactive users. So I can then call the <url>/rest/api/user?username=<username> api to get more information, right?

But it doesn't tell me if the user is active or inactive, either!

From exploring these forums I gather that there is no better way (using the rest api) to get a list of users so my best hope is to find a way to determine if a user is active or inactive.

Is there a way to do that!?

I'm on Confluence Server if that makes a difference.

 

2 answers

1 vote
Timothy Community Leader Dec 27, 2016

If you've already search and found no REST api to do it, you'll probably have to write your own REST api to expose that data.

 

1 vote
Deleted user Dec 29, 2016

There is a way to do this, sort of, without creating a new REST API.

First off, understand that there is no way to get USERS through the API: you can only get users in a group.

If you get the users from the confluence-users group that will probably be all the users on your system (this is true of our system).

The way you find out if this is true for you is to look in the global permission: <your_URL>/admin/permissions/globalpermissions.action. This will list the groups that have all the users who can actually do anything. There may be users on your system who are not in any of these groups but they have no access to anything (and they don't count against licensing).

My problem: some of the users in confluence-users were inactive so my final list included some inactive users. But inactive users have no business being in groups – they should be removed!

Once I removed them, the list of confluence-users IS the list of active users.

In summary: to get a list of users you need a group or a collection of groups that have all the users in it. Then you need to make sure that these groups have no inactive users. Then you can uses the <url>/rest/api/group<group name>/member API to get the users from those groups (be sure to remove any duplicates from the aggregated  list) and it will be correct!

<url>/rest/api/group<group name>/member API is not retrieving more than 200 members in a group.Is there a way to get rid of the system default limit 200?

yeah it's not listing above 200. please help me to get out of this

Suggest an answer

Log in or Sign up to answer
TAGS
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...

480 views 24 9
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