Organizations
Create and manage organization accounts for team collaboration.
Build multi-tenant team workspaces where users create organizations, invite members, assign roles, and collaborate - with dedicated billing per organization.
Organizations in the Next.js Prisma kit enable multi-tenant team workspaces where users create shared accounts, invite members, and assign roles. Each organization has isolated data, dedicated billing, and independent settings. This model supports B2B SaaS applications requiring team collaboration with role-based access control.
Organizations are shared workspaces independent of any single user. Multiple users join as members with assigned roles. Each organization has its own settings, billing, and data isolation.
- Use organizations when: you're building B2B SaaS, team collaboration tools, or any app where multiple users share a workspace.
- Use personal accounts only when: you're building a B2C app where users work individually without sharing data.
Features
| Feature | Description |
|---|---|
| Organization CRUD | Create, update, and delete organizations |
| Member management | Invite, remove, and manage team members |
| Role-based access | Assign roles (owner, admin, member) with permissions |
| Account switcher | Navigate between personal and organization contexts |
| Dedicated billing | Per-organization subscriptions and invoices |
| Authorization policies | Custom business rules for organization operations |
Documentation Structure
| Page | Purpose |
|---|---|
| Organization Concept | How organizations fit into the account model |
| Dashboard | Organization workspace and customization |
| Account Switcher | Navigate between accounts |
| Settings | Organization profile and danger zone |
| Authorization Policies | Custom rules for org operations |
Routes
Organizations share routes with personal accounts. The active context is determined by application state, not URL parameters.
| Route | Purpose |
|---|---|
/dashboard | Organization dashboard |
/settings | Organization settings |
/settings/members | Member management |
/settings/roles | Role management |
/settings/subscription | Billing and subscription |
Common Pitfalls
- Forgetting account mode configuration: If organizations don't appear, check Account Modes is set to
hybridororganizations-only. - Assuming URL-based routing: Organizations don't use URL slugs like
/org/acme. The active organization is stored in context/state. - Not checking workspace context: Always use
useTeamAccountWorkspace()hook in team components to access current organization data. - Mixing personal and team contexts: Personal account pages use
useUserWorkspace(), organization pages useuseTeamAccountWorkspace(). Don't mix them.
Frequently Asked Questions
Can a user belong to multiple organizations?
What happens when I delete an organization?
How do I limit the number of organizations a user can create?
Can I disable personal accounts entirely?
Next: Organization Concept →