Docs

Organizations

Organizations are a flexible and scalable way to manage users and their access to resources within your Clerk application. With organizations, you can assign specific roles and permissions to users, making them useful for managing projects, coordinating teams, or facilitating partnerships.

Note

To explore organizations in Clerk, check out this demo repo: https://github.com/clerk/organizations-demo

Enable organizations in your application

Organizations are disabled by default.

To enable organizations:

  1. Navigate to the Clerk Dashboard.
  2. In the navigation sidebar, select Organizations Settings.
  3. Toggle on Enable Organizations.

Once organizations are enabled, you will be presented with the default settings, roles, and permissions that are applied to all organizations in that application instance. The following sections will explain these settings in more detail.

Roles and permissions

Roles determine a user's level of access and permissions within an organization. Learn more about how roles and permissions work and how to create your own with Clerk.

Membership limit

There is no limit to the number of organizations a user can be a member of.

However, there is a limit to how many members total can be in a single organization. By default, the membership limit is set to 5 members. To change this limit, scroll to the Default membership limit section and update the membership limit.

If you are on the Free plan, you can update the membership limit to a maximum of 5 members.

If you have the Pro plan, you can set the membership limit to unlimited.

You can also change this limit on a per-organization basis:

  1. Navigate to the Clerk Dashboard.
  2. In the navigation sidebar, select Organizations.
  3. Select the organization you want to update.
  4. In the Membership limit section, update the membership limit. Note that this will not apply to organizations that already exist.

Default ability to delete

By default, organizations are deletable. Any member with the "Delete organization" permission can delete an organization. To prevent organizations from being deleted, you can disable the ability to delete organizations by scrolling to the Default ability to delete section and unchecking the option. Note that this will not apply to organizations that already exist.

Verified domains

Verified domains can be used to streamline enrollment into an organization. For example, if the domain @clerk.com is added to an organization, any user with a @clerk.com email address can be automatically invited or be suggested to join this organization. This feature is useful for organizations that want to restrict membership to users with specific email domains. See the verified domains documentation for more information.

Automatic invitations and suggestions

Users with email addresses that match the organization's verified domain(s) can receive automatic invitations or automatic suggestions to join the organization.

For example, if the domain @clerk.com is the verified domain for an organization, any user with an email address ending in @clerk.com will receive an automatic invitation or suggestion to join the organization.

To allow automatic invitations and suggestions in your application, you must first enable them in the Clerk Dashboard. See the Verified domains guide for more information.

Once enabled for your application, when an organization admin is creating a verified domain in your application, they are able to enable automatic invitations or suggestions for that domain. They cannot enable both at the same time.

Once invitations are enabled for a domain, users with email addresses that match the domain will see Join button next to the organization in the Clerk UI. Selecting the button will accept the invitation and the user will be added as a member of the organization.

Once suggestions are enabled for a domain, users with email addresses that match the domain will see a Request to join button next to the organization in the Clerk UI. Selecting the button will send a membership request to the organization.

Membership requests

Membership requests are requests from users who want to join an organization. A membership request is created when a user sees a suggestion to join an organization and selects the Request to join button. Therefore, membership requests are only available for organizations that have the Verified domains feature enabled and the Automatic suggestions feature enabled in both the Dashboard and for the specific domain.

Active organization

There are two types of accounts that a single user can have in a Clerk application: a personal account and an organization account. A personal account is the default account type, and it is created when a user signs up for your application. An organization account is created when a user creates or joins an organization within your application.

Users will always have a single personal account. They can have multiple organization accounts if they are members of multiple organizations.

When a user is a member of an organization, they can switch between their personal account and an organization account. The organization account that a user is currently viewing is called the active organization. The active organization determines which organization-specific data the user can access and which roles and permissions they have within the organization.

When a user signs in to your application, they are viewing their personal account and no organization is set as active. Even if they are a member of only one organization, they must explicitly switch to that organization to set it as active.

The easiest way to allow users to switch between their personal account and their organization account is to use Clerk's <OrganizationSwitcher /> component. Once a user selects an organization, that organization is set as the active organization.

You can also use the setActive() method, which is available on the Clerk object and is returned by the useOrganizationList() hook.

If you would like to learn how to hide a user's personal account in order to enforce an organization-centric application, see the dedicated guide.

Create an organization

Application owner

You can create organizations in the Clerk Dashboard or in your application. To create an organization in the Clerk Dashboard:

  1. Navigate to the Clerk Dashboard.
  2. In the navigation sidebar, select Organizations.
  3. Select the Create Organization button.
  4. Enter the organization's name and slug. The slug is a unique identifier for the organization and is used in URLs. Select the organization's owner from the list of users in your application. The owner is the user who will be the organization's admin.

Monthly active organization (MAO)

The number of organizations you can have in a single Clerk application depends on your Clerk plan and the type of instance (development or production), and is measured by "monthly active organizations" (MAOs). An MAO is an organization with more than one user that has signed in that month.

With the Free plan:

  • In development instances, you can have up to 50 MAOs in a single Clerk application. Each MAO can have up to 5 members.
  • In production instances, you can have up to 100 MAOs in a single Clerk application. Each MAO can have up to 5 members.

With the Pro plan:

  • In development instances, you can have an unlimited number of MAOs in a single Clerk application for free. Each MAO can have an unlimited number of members.
  • In production instances, you can have up to 100 MAOs in a single Clerk application for free. Each MAO after the first 100 costs $1.00 per month. Each MAO can have an unlimited number of members.

For more details on pricing, see our pricing page.

If you need more organizations or custom pricing, please contact our sales team to upgrade to the Enterprise plan.

Application user

By default, users can create organizations within your application. To disable this permission for all users:

  1. Navigate to the Clerk Dashboard.
  2. In the navigation sidebar, select User & Authentication > Email, Phone, Username.
  3. At the bottom of the page, in the Default user permissions section, toggle Allow users to create organizations off.

If you want to only disable this permission for certain users, you can override it on a per-user basis on the user's profile page in the Clerk Dashboard:

  1. Navigate to the Clerk Dashboard.
  2. In the navigation sidebar, select Users.
  3. Select the user you want to update.
  4. In the User permissions section, toggle Allow user to create organizations off.

When a user creates an organization, they become the organization's admin. As the organization's admin, they have full control over the organization, including the ability to update the organization's settings, invite users to join the organization, and manage the organization's members.

A single user within one of your applications can create up to 100 organizations in that application. If you need users to be able to create more organizations than this, reach out to support and you can have the limit raised.

The easiest way to allow users to create organizations is to use Clerk's <CreateOrganization /> and/or <OrganizationSwitcher /> components.

Organization invitations

Organization invitations are a way to invite users to join an organization. When a user is invited to an organization, they will receive an email with a link to accept the invitation. Once they accept the invitation, they will be added as a member of the organization.

By default, only admins can invite users to an organization.

This feature requires that Email address is enabled as an identifier, as Clerk uses the user's email address to send the invitation. You can still disable Email address as an authentication option if you do not want users to be able to sign-in with their email address.

To configure your application's Email address settings:

  1. Navigate to the Clerk Dashboard.
  2. In the navigation sidebar, select User & Authentication > Email, Phone, Username.
  3. In the Contact information section, ensure that Email address is toggled on.
  4. Next to Email address, select the settings cog icon to configure the email address settings. Here, at least Require should be toggled on.

Organization management

As the application owner, you have control over all of the organizations within your application - both those created by you and those created by your users. You can create, update, and delete organizations, as well as manage their members and settings.

  1. Navigate to the Clerk Dashboard.
  2. In the navigation sidebar, select Organizations. Here, you can view and manage all organizations within your application.
  3. Select a specific organization to view its details, members, and settings. Here, you can update the organization's name, slug, and logo. You can also set the organization's membership limit and public and private metadata.

For managing organizations in your application, Clerk provides a set of prebuilt components:

  • <CreateOrganization /> - A form for a user to create a new organization.
  • <OrganizationProfile /> - A profile page for the user's currently active organization.
  • <OrganizationSwitcher /> - A dropdown menu that allows a user to switch between their personal account and their organization account(s), as well as create a new organization if they have permission to do so.
  • <OrganizationList /> - A list of organizations that a user is a member of.

If Clerk's prebuilt components don't meet your specific needs or if you require more control over the logic, you can rebuild and customize the existing Clerk flows using the Clerk API. Some useful guides include:

Feedback

What did you think of this content?