Skip to main content

Multi-Tenancy Module

Maturity: Preview

Multi-Tenancy is under active development and currently ships as part of the Identity Validator package.

Multi-Tenancy provides tenant isolation and automatic context resolution for SaaS applications. It supports multiple resolution strategies (header, token, subdomain) and helps you enforce tenant boundaries across your application and data layer.

Key capabilities

  • Multiple tenant resolution strategies (header, token, subdomain).
  • Automatic tenant context injection.
  • Row-level isolation with EF Core query filters.
  • Storage isolation per tenant.
  • Configurable enforcement (require or optional tenant context).

Packages

  • .NET: PrimusSaaS.Identity.Validator (Multi-Tenancy included)

Core concepts

  • Tenant: a logical customer boundary within a shared application.
  • Tenant resolver: the strategy used to determine the current tenant.
  • Tenant context: the resolved tenant identifier attached to the request.