How to limit the number of members in an organization?

I would like to limit the number of members certain organizations are allowed to have. For example I might want one organization to allow only 5 members. Assuming this needs to be done with a custom action, which event could I hook into to implement this? Pre-registration seems like an option but I’m not sure if that includes the org membership process.


1 Like

Hello @jlines

According to the Auth0 documentation, there is no built-in way to limit the number of members per organization (Entity Limit Policy).

However, you may be able to implement this functionality using a custom action that runs on the Post User Registration event (Understand How Auth0 Organizations Work). This event is triggered after a user registers and joins an organization. You can use the custom action to check the number of members in the organization and revoke the user’s membership if it exceeds the limit. You can also send a notification to the user or the organization administrator to inform them of the action. You can use the Auth0 Management API to perform these operations (Retrieve User's Organization Memberships).

I hope this helps. :blush:

1 Like