I’m seeking guidance regarding a scaling challenge we’re encountering with Auth0 Organizations in our production environment. Let me outline our current setup and the specific issue we’re facing.
Current Architecture:
Single tenant configuration for our production environment
Each merchant is managed as a separate Auth0 Organization
Internal users need to connect to multiple merchant organizations
The Challenge:
We’ve encountered a limitation where we cannot fetch more than 1000 organizations for a single user. This becomes problematic specifically for our internal users who need to manage and connect to more than 1000 merchant organizations.
Specific Details:
Our system architecture uses Auth0 Organizations to maintain separation between different merchants
Internal users (such as support staff and administrators) require access to all merchant organizations
The 1000 organization limit is preventing us from retrieving the complete list of organizations for these users
Questions for the Community:
Is this the recommended approach for managing multiple merchants within Auth0?
Are there any best practices or alternative architectures we should consider for handling large-scale multi-merchant scenarios?
Are there any known workarounds for the 1000 organization limit?
Any insights, recommendations, or examples of similar implementations would be greatly appreciated. We’re particularly interested in understanding if we need to restructure our approach to better handle this scale.
Yes, this is a valid approach for managing multiple merchants within Auth0 by leveraging the Organizations feature. Our Multiple Organization Architecture documentation explains this very well.
Unfortunately, you can only query up to 1000 organizations that belong to a user by passing in the page and per_page query parameters in your request.
For example, here is what the request would look like for the first 100 organizations for a specific user:
GET https://YOUR_AUTH0_DOMAIN/api/v2/users/{user_id}/organizations?page=0&per_page=100
And here is what it would look like for the next 100 organizations for that same user:
GET https://YOUR_AUTH0_DOMAIN/api/v2/users/{user_id}/organizations?page=1&per_page=100
Hey @rueben.tiow,
it’s not true, we can’t fetch 1000 organizations per page, which is not a valid request.
Maximum per page is 100 and the maximum page is 9
I have corrected my previous reply. The maximum number of organizations you can retrieve for a specific user is limited to 1000 records when using the Management API’s List user’s organizations endpoint.
For the moment, the only way to get all the organizations that a user belongs to is to iterate through each organization and check whether the user is a member of that organization.
This is certainly a cumbersome task to find all the organizations that a user belongs to. If you have a moment, I recommend submitting a Product Feedback request with your use-case for retrieving more than 1000 records when calling the Management API’s List user’s organizations endpoint.