I'm trying to get a complete list of all users in our Confluence Cloud instance using the REST API, but I'm having trouble finding the correct endpoint and understanding the required permissions.
I've attempted several approaches but encountered issues:
1. User Search API - Requires Query Parameter
GET /wiki/rest/api/user/search?query={term}&limit=200
Issue: This endpoint requires a search query and doesn't return all users without a specific search term.
2. V2 Users API - 400 Bad Request
GET /wiki/api/v2/users?limit=200
Issue: Returns 400 Bad Request. Not sure if this endpoint exists or if I need different permissions.
And when I try to implement the endpoint in forge for my project ,
const response = await asUser().requestConfluence( route`/wiki/rest/api/user/search?query=${query}&limit=20`);
Issue: Returns 401 Unauthorized even though I have all permissions and provided all required scopes in my manifest .
I've been stuck on this for quite some time and would be incredibly grateful for any insights, documentation links, or working examples the community could share. Even pointing me in the right direction would mean a lot.
Hello @P Shreekar shenoy
/rest/api/group/{groupId}/member
This endpoint retrieves a list of users belonging to a specific group. You can use this endpoint to get a list of all users by using the group "confluence-users", which contains all users with access to the Confluence instance.
Thanks @arielei , but I want all users, not just a particular group. In my project, I'm going to need all users. Is there any other endpoints ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your question was for Confluence users, so using that group will give you ALL users that has Confluence app attached to them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@arieleiThis approach is good, and I really appreciate your help. However, I can't follow this method for my requirement, as users in organizations may be removed or moved to different groups. But this is the closest approach I understand .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.