Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get count of users in an organization returns 404

Rocky Asante
July 13, 2026

To get the Confluence metrics, such as total capacity and remaining capacity, I introduced a caching mechanism to handle the 429 error, which indicates “You exceeded the rate limit.” Atlassian provides an endpoint to retrieve the number of users in an organization, with filters for Confluence groups and user status, allowing us to get the total count without using caching.

https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/#api-v2-orgs-orgid-directories-directoryid-users-count-get This endpoint returns 404 error and we have tried with full scope for a token.

2 answers

0 votes
Tomislav Tobijas
Community Champion
July 14, 2026

Hi @Rocky Asante ,

As Viswanathan said/asked - can you maybe share which endpoints and authorization you used to retrieve this? Also, did you use your account or service account to do so? I'm asking as there's a difference between the two. 👀

In addition to that, there are two, let's say, related feature requests:

Cheers,
Tobi

Rocky Asante
July 14, 2026

I used a service account token and gave it most of the read scopes, also made it admin for confluence

 

I tried using the Admin token as well, but still got a 404 error. If you manage to get it working, let me know how you did it.

Tomislav Tobijas
Community Champion
July 14, 2026

@Rocky Asante I've created some kind of explanation/tutorial related to another question but this might be useful as well:

0 votes
Viswanathan Ramachandran
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 Champions.
July 13, 2026

hi @Rocky Asante 

Thanks for posting this. 

I hope you meet the below?

  • org ID or directory ID belong to the same Atlassian organisation ?
  • The Admin API endpoint is right?  
  • The token is associated with an organisation admin with all scopes? 

The other likely reason could be

  • The organisation doesn't use the supported user directory. The endpoint only works with specific directory types.
  • The endpoint may not yet be enabled for your organisation or tenant. Some Admin APIs are rolled out selectively or have feature prerequisites.

If you've confirmed the above but the endpoint consistently returns 404, it may indicate an issue with the endpoint itself or undocumented availability restrictions.

I would recommend you to reach out to developer community. 

https://community.developer.atlassian.com/

May be developer support, if you have permissions

https://developer.atlassian.com/support 

 

Rocky Asante
July 14, 2026

Thanks for the response.

  • org ID or directory ID belong to the same Atlassian organisation ? Yes
  • The Admin API endpoint is right?  Yes
  • The token is associated with an organisation admin with all scopes? Yes - gave all read scope

I am tried both Service Account Token and Admin PAT token, both gave 404 for that endpoint. 

 

I don't understand why getting Confluence license metrics is so hard to expose; we have to jump through so many hoops just to make it work.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events