How to query total count of users given a criteria

Hello,

We are using api/v2/users (documented here) to count users given specific criteria. We are noticing that the include_totals gets limited to 1,000 even if there are more (forum post and limitations documentation). I looked over the solutions in the limitations section, but I don’t really think they will work for us. I can give a little more background on our use case:

We store users’ “organization” in app_metadata so we know which internal organization they belong to. For some organizations, we charge per user. We were hoping to have a quick way to query for the total so we can bill our users every month. In the limitations section, it mentions using Bulk User Exports which honestly feels like overkill for just checking one total value.

Is there a better way to fetch this information?

Thank you,

David

Hi @davidhouseknechtdev,

Thanks for reaching out to the Auth0 Community!

I understand that you’d like to calculate the total number of users who are in a specific “organization” as part of the way you bill your users.

Unfortunately, because the Management API List Users endpoint limits to 1000 records, the only way to get the complete total count of users in a specific “organization” is to export your users and perform a count on those users. I know that it may seem like overkill to export your users and perform the calculations that way, but there currently aren’t any other alternatives to calculate this value.

Hoped this helps!

Please let me know if you have further questions.

Thank you.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.