How to fetch all Users present in Confluence User Management?

Deleted user May 11, 2023

Hi Team,

I have explored rest api's of Confluence. I was not able to find any Rest API which would provide complete list of all the users present in User Management section of Confluence.

There is API which would list out users present in "confluence-users" group. But In our Confluence instance there are many users who are not present in these groups but synced from Microsoft Active Directory. So I need to fetch all the users present in Confluence User Management page.

Can anyone please help me with this?

Thanks & Regards,

Preethi H R

1 answer

1 accepted

0 votes
Answer accepted
Matt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 12, 2023

Generally, with integration of AD, users will be synced from AD into the confluence-users group. But, to absolutely verify, you can leverage the "group" endpoint (/rest/api/group) and then extract the members from each group. This will give you all groups/users synced into Confluence.  You will likely have duplication of users because they may be members of many groups.

Example here: https://github.com/nefariousOne/confluence-rest-api-samples/blob/main/confluence_get_group_members.py

Deleted user May 14, 2023

Hi Matt, 

Thank you very much for your reply. As suggested, we can fetch all groups in Confluence and then members from each group. This would give us all users synced in Confluence User management.

But there are few users who have been removed from Confluence User Management and are shown on UI as "Unknown User". Do you have any idea how to fetch these types of users as well. Attaching the screenshot for reference. In the screenshot, the user novita.chelluri is shown as Unknown User as she is removed from Confluence User management. How do we fetch this user?

Unknown User ss.png

Matt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 15, 2023

@[deleted], if you have access to the DB, you can try this: 

How to get a list of all "Unknown User" in Confluence | Confluence | Atlassian Documentation

Like Khammampati Surendra likes this
Deleted user May 16, 2023

Hi Matt,

Thank you for your response. Is there any API to make active users as "Unknown user" in Confluence?

Matt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 16, 2023

No, I don't believe so. The /user endpoint only allows for GET requests. 

Deleted user May 16, 2023

Yeah fine. Thank you, Matt, for all your suggestions and they were very helpful.

Like Matt likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events