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

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

get the list of all users with confluence api - how to Edited

Hi!

I tried to do smth like confluence/rest/api/user?username=a and username=* and some other cases but it shows an error

No user found with key : null

so is the key the must parameter?

and is there a wildcard  for any parameter so I could get the list of all users

or any other way I could do it?

any help would be really appreciated

2 answers

Hi!

The documentation mentions that a parameter is required and there is no known wildcard option. That being said, the usual trick I use is to query the confluence-users group members which list all users having access:

/rest/api/group/confluence-users/member

You can also create a group with all users even unlicensed and use the same endpoint.

Feels like a workaround but it's working well!

Hope it helps!

Cheers

Hi @miikhy

Thanks for your answer. I tried the exact query you sent but It returns admin user only, did I misunderstood you and there are some extra things/steps I need to do?

Hi @mzhydenko,

Have you tried adding ?limit=500 to get more results?

Also, the group name in the URL is the group you're browsing, are non-admin users members of this group? Just tried it locally and it worked well :(

Cheers

Like mzhydenko likes this

Thank you @miikhy!

I`ll try that and hope it`ll work for me too.

Have a nice day :)

Great!

Keep us posted!

Cheers

This worked for me, thank you so much!

I did want to point out though that confluence-users is the default user group that gets some one access, but it could be something else if configured so. for instance, my company uses the group atlassian-users to grant access to Confluence, JIRA, and BitBucket.

I know I'm a bit late to the party but you future reference. There is one more way to get a list of all users without specifying the limi by making a get request to the  following end point: 

http://localhost:1990/confluence/rest/user-management/1.0/users

This will return you all the users. I hope this helps :)  

Yes it helps !
It works file with Jira Server v8.5.
Thank you for this trick.

I will be surprised if the end point worked for Jira as I mentioned, this endpoint is for confluence, having said that I haven't tried it for Jira. Just to reconfirm, it did work for you when you tried it for Jira and not confluence, right?  

I tried that URL, but got a 401 - Unauthorized response on a server where I am not admin. Probably it is meant - as the name suggests - for user management, and that needs the user to be admin.

You can only access the Users page if you are a system admin hence, it will only work if you're the admin of the instance. If you try it with the admin user, it will work. Normal users cannot access the 'Users' page in the first place.  

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

🏑 Atlympic Event: Confluence

Hello Community!  Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...

524 views 18 17
Read article

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