Overview
The Organization Management section allows you to create and manage multi-tenant organizations in your Better Auth application. Handle organization structures, team hierarchies, member roles, and invitations all from one interface.Setup
Before using organization management, enable the organization plugin in your Better Auth configuration:Accessing Organizations
Navigate to Organizations from the main sidebar. If the plugin is not enabled, you’ll see setup instructions.Key Features
Organization List View
The organizations page displays:- Total organization count - Live count of all organizations
- Organization cards/table - Name, slug, and creation date
- Search functionality - Find organizations by name or slug
- Pagination - 20 organizations per page
- Sorting - Sort by creation date (newest/oldest)
Organization Details
Each organization shows:- Organization Name - Display name
- Slug - URL-friendly identifier
- Organization ID - Unique identifier (copyable)
- Member Count - Total members in the organization
- Team Count - Number of teams within the organization
- Invitation Count - Pending invitations
- Created/Updated Dates - Timestamps
Organization Actions
View Organization
See detailed information:
- Full organization profile
- Member list with roles
- Teams and team members
- Pending invitations
- Organization metadata
Edit Organization
Update organization details:
- Change organization name
- Modify slug (auto-generated from name)
- Update metadata
Delete Organization
Remove an organization:
- Confirmation modal required
- Deletes all teams and memberships
- Cannot be undone
Manage Teams
Navigate to organization teams:
- Create new teams
- View team members
- Assign team roles
Organization Workflows
Create an Organization
- Click Add Organization button
- Enter organization details:
- Name (required) - e.g., “Acme Corp”
- Slug (auto-generated) - e.g., “acme-corp”
- Slug is automatically created from name:
- Lowercase conversion
- Spaces become hyphens
- Special characters removed
- Click Create to add organization
Edit Organization
- Find organization in list
- Click Edit icon (pencil) in actions column
- Update name or slug:
- Changing name auto-updates slug
- You can manually override the slug
- Click Update to save
View Organization Members
- Click View icon (eye) on an organization
- See member statistics:
- Total members
- Active teams
- Pending invitations
- Navigate to detailed member list if needed
Search and Filters
Search
Search organizations by:- Organization name (partial match)
- Slug (partial match)
Search is case-insensitive and matches anywhere in the name or slug.
Filters
Available filters:Created Date Filter
Created Date Filter
- Filter by creation date range
- Use calendar picker to select:
- From date - Start of range
- To date - End of range
- Shows organizations created within the range
Bulk Operations
Seed Organizations
Quickly create test organizations for development:Configure Seeding
- Enter number of organizations (1-100)
- Organizations get auto-generated names and slugs
Export Organizations
Export organization data to CSV:- Click Export CSV button
- Downloads file with columns:
- Organization ID
- Name
- Slug
- Created At
- Filename includes current date:
organizations-export-2024-01-15.csv
Organization Details Modal
Click View on any organization to see:Overview Tab
Overview Tab
- Organization name and slug
- Copyable organization ID
- Creation and update timestamps
- Organization metadata (if configured)
Members Tab
Members Tab
View all organization members:
- Member name and email
- Role within organization
- Join date
- Member actions (add/remove)
Teams Tab
Teams Tab
Manage organization teams:
- Team list with member counts
- Create new teams
- Navigate to team details
- Assign team administrators
Invitations Tab
Invitations Tab
Pending invitations:
- Invited email addresses
- Invitation status
- Role being offered
- Invitation date
- Actions: Resend or Cancel
Slug Generation
Slugs are automatically generated from organization names:- Convert to lowercase
- Replace spaces with hyphens
- Remove special characters
- Remove multiple consecutive hyphens
- Trim leading/trailing hyphens
You can manually edit the slug after it’s auto-generated, but it must remain URL-safe.
Team Management
Within each organization, you can manage teams:Create Teams
Team Roles
Each team member can have:- Owner - Full team control
- Admin - Manage members and settings
- Member - Standard access
Member Management
Add Members to Organization
Remove Members
- Find member in organization member list
- Click Remove icon
- Confirm removal
- Member loses access to organization and all teams
Invitations
Manage pending organization invitations:Create Invitation
Manage Invitations
- Resend - Send invitation email again
- Cancel - Revoke pending invitation
- View Status - See if invitation was accepted/rejected
Best Practices
Plan Team Structure
Design your team hierarchy before creating organizations:
- Department-based teams
- Project-based teams
- Role-based teams
Manage Roles Carefully
Assign appropriate roles:
- Limit Owner access
- Use Admin for department leads
- Member for individual contributors
Troubleshooting
Organizations page shows setup instructions
Organizations page shows setup instructions
The organization plugin is not enabled. Follow these steps:
- Add organization plugin to auth config
- Run database migrations
- Restart your application
- Refresh the Studio page
Cannot create organization with existing slug
Cannot create organization with existing slug
- Slugs must be unique across all organizations
- Try modifying the slug manually
- Or change the organization name to generate a different slug
Members not showing in organization
Members not showing in organization
- Verify the user is actually a member (check database)
- Ensure organization plugin is properly configured
- Check for errors in the browser console
API Reference
Organization operations use these endpoints:GET /api/organizations- List organizationsPOST /api/organizations- Create organizationGET /api/organizations/:id- Get organization detailsPUT /api/organizations/:id- Update organizationDELETE /api/organizations/:id- Delete organizationGET /api/organizations/:id/members- Get membersGET /api/organizations/:id/teams- Get teamsGET /api/organizations/:id/invitations- Get invitationsPOST /api/seed/organizations- Seed test data