ABP Framework — Multi-Tenancy

Configure ABP Framework multi-tenancy with tenant resolution and data filtering.

13|4|Updated May 27, 2026
One-click install
npx skills add https://github.com/burakdmir/abp-skills --skill abp-framework-multi-tenancy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ABP Framework — Multi-Tenancy
Source: https://github.com/burakdmir/abp-skills/tree/main/claude/abp-multitenancy
Command: npx skills add https://github.com/burakdmir/abp-skills --skill abp-framework-multi-tenancy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ABP multi-tenancy setup guidance solves the confusion around correctly resolving the current tenant and ensuring data isolation between Host and Tenant contexts without leaking or mixing tenant data.

Core Features & Use Cases

  • Tenant identification & scope: Explains how IMultiTenant with nullable TenantId and ICurrentTenant drive correct behavior for Host vs Tenant data.
  • Tenant resolution strategies: Covers resolver ordering and the common ways to determine tenant (user claims, query string, route, header, cookie, and subdomain/domain patterns), including custom resolvers and fallback tenant.
  • Data filtering control: Shows how ABP’s multi-tenancy filter works and how to disable it safely with IDataFilter.Disable<IMultiTenant>() for specific cross-tenant/admin use cases.
  • Database isolation models: Compares single database, database-per-tenant, and hybrid approaches and what they imply for implementation choices.

Quick Start

Ask an AI coding assistant to configure ABP Framework v10.4 multi-tenancy by enabling AbpMultiTenancyOptions, implementing tenant-aware entities with IMultiTenant, and setting up a subdomain tenant resolver while ensuring Host operations use CurrentTenant.Change(null).

Frequently Asked Questions about ABP Framework — Multi-Tenancy

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

FAQPage Schema
How do I resolve the current tenant in ABP Framework multi-tenancy?

ABP Framework multi-tenancy resolves the current tenant by configuring tenant resolvers that check claims, route, header, cookie, or subdomain patterns in a specific order with fallbacks. This ensures the correct tenant context is applied automatically to incoming requests for data isolation.

How does ABP data filtering work for multi-tenant entities?

ABP data filtering automatically isolates multi-tenant entities by using the IMultiTenant interface and ICurrentTenant to scope database queries. It applies a global filter so Host and Tenant data remain separate without requiring manual query conditions.

How do I disable the multi-tenant data filter for cross-tenant queries in ABP?

To disable the multi-tenant data filter for cross-tenant queries in ABP, wrap your logic using IDataFilter.Disable<IMultiTenant>(). This temporarily bypasses automatic tenant scoping, allowing administrative operations across all tenant data.

What is the difference between single database and database-per-tenant in ABP SaaS?

Single database and database-per-tenant are ABP SaaS database isolation models. Single database shares schema with tenant discrimination, while database-per-tenant provides physical isolation, impacting configuration complexity and implementation choices for tenant-aware repositories.

How do I configure ABP multi-tenancy options for a Host context?

To configure ABP multi-tenancy options for a Host context, enable AbpMultiTenancyOptions and ensure Host operations use CurrentTenant.Change(null). This correctly scopes the nullable TenantId so Host data remains distinct from tenant-scoped data.

Can I use a subdomain to identify tenants in ABP Framework?

Yes, you can use subdomain tenant resolution in ABP Framework by setting up a subdomain resolver within the tenant resolver chain. It extracts the tenant identifier from the domain pattern, applying correct tenant scoping for SaaS data isolation.