clerk-orgs

Enable multi-tenant B2B SaaS organization support with Clerk Organizations, RBAC, and org-scoped routing.

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/koushik-hait/xigenis-landingpage-v1 --skill clerk-orgs-koushik-hait
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clerk-orgs
Source: https://github.com/koushik-hait/xigenis-landingpage-v1/tree/main/.agents/skills/clerk-orgs
Command: npx skills add https://github.com/koushik-hait/xigenis-landingpage-v1 --skill clerk-orgs-koushik-hait

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Clerk Organizations for B2B SaaS solves the problem of letting users work within team/org boundaries while enforcing correct access control and org-scoped data safety.

Core Features & Use Cases

  • Organization enablement & switching: Build multi-tenant flows using OrganizationSwitcher, org creation, and membership-based UX (including membership required vs optional).
  • Org-scoped authorization (RBAC): Enforce access with role and System Permission checks using auth().has and the canonical org:sys_* permission slugs.
  • Org routing safety patterns: Prevent cross-org data access by validating orgSlug invariants and scoping writes by orgId from auth() on every page, API route, and server action.
  • Membership management & invitations: Invite, list, and revoke members with the org:sys_memberships:manage permission and the correct Backend API parameters.
  • Enterprise SSO per organization: Configure org-specific SAML/OIDC with enterprise_sso strategy and access provider metadata from enterpriseConnection.

Quick Start

Update your app to be org-aware by enabling Clerk Organizations and adding OrganizationSwitcher to your dashboard while gating org-scoped pages with auth() checks on orgId/orgSlug and roles or permissions.

Frequently Asked Questions about clerk-orgs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Clerk Organizations with role-based access control to my multi-tenant B2B SaaS app?

You can add Clerk Organizations by enabling the feature, selecting a membership mode, and using auth() to check roles and permissions with canonical org:sys_* slugs like org:sys_memberships:manage. This enforces RBAC across org-scoped routes.

How do I prevent cross-tenant data access when building org-scoped dashboards with Clerk?

Prevent cross-tenant data access by validating orgSlug invariants and scoping all database writes by the orgId obtained from auth() on every page, API route, and server action. This ensures strict org routing safety.

Can I configure enterprise SSO for specific organizations using Clerk?

Yes, you can configure org-specific SAML or OIDC enterprise SSO using the enterprise_sso strategy. You can access provider metadata directly from the enterpriseConnection to secure individual organizations.

How do I manage member invitations in a multi-tenant Clerk application?

You can invite, list, and revoke members by using the correct Backend API parameters alongside the org:sys_memberships:manage permission check. This gates all membership management flows securely within the organization.

Does Clerk support organization switching for multi-tenant B2B SaaS platforms?

Yes, Clerk supports organization switching through the OrganizationSwitcher component. You can build multi-tenant flows with org creation and membership-based UX, including membership required versus optional modes.

What is the best way to enforce organization-scoped authorization in Next.js with Clerk?

The best way to enforce org-scoped authorization is by using auth().has to perform System Permission checks with canonical slugs like org:sys_billing:manage. This validates user roles and permissions directly within your server actions.