abp-multi-tenancy

Implement IMultiTenant and CurrentTenant for tenant-aware data isolation in ABP applications.

1|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/afonsoft/VideoChat --skill abp-multi-tenancy-afonsoft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: abp-multi-tenancy
Source: https://github.com/afonsoft/VideoChat/tree/main/.agents/skills/abp-multi-tenancy
Command: npx skills add https://github.com/afonsoft/VideoChat --skill abp-multi-tenancy-afonsoft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ABP multi-tenancy enables clean tenant isolation and context switching in complex applications by implementing IMultiTenant and using CurrentTenant for automatic filtering.

Core Features & Use Cases

  • Tenant-aware entities and automatic TenantId handling with IMultiTenant
  • Runtime tenant switching via CurrentTenant.Change() for host operations and tenant-specific tasks
  • Data filtering by current tenant with DataFilter.Disable(IMultiTenant) when cross-tenant access is required

Quick Start

Configure ABP to enable multi-tenancy, annotate entities with IMultiTenant, and rely on CurrentTenant for tenant-aware data.

Frequently Asked Questions about abp-multi-tenancy

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

FAQPage Schema
How do I implement multi-tenant data isolation in ABP?

Multi-tenant data isolation in ABP is implemented by having entities implement IMultiTenant and relying on CurrentTenant for automatic data filtering by TenantId. This ensures users only access data belonging to their resolved tenant context.

How does CurrentTenant.Change() work for tenant switching in ABP?

CurrentTenant.Change() executes runtime tenant switching in ABP, allowing host operations or tenant-specific tasks to temporarily override the active tenant context. This enables cross-tenant data operations without permanently altering the global tenant resolution.

How do I disable multi-tenant filtering to access cross-tenant data in ABP?

Cross-tenant data access in ABP is achieved using DataFilter.Disable(IMultiTenant) to temporarily bypass automatic tenant filtering. This allows host-level queries to retrieve data across all tenants before re-enabling the filter.

What is the role of IMultiTenant in ABP multi-tenancy?

IMultiTenant is an interface in ABP that annotates entities for tenant-aware tagging and automatic TenantId handling. It marks domain entities so the framework can automatically apply data isolation filters based on the current tenant context.

Does ABP multi-tenancy support host and tenant contexts simultaneously?

Yes, ABP multi-tenancy applies across both host and tenant contexts, supporting entity tenant tagging and tenant resolution order. Host users can switch to specific tenant contexts using CurrentTenant.Change() for targeted operations.