Member Junction
    Preparing search index...

    Interface TenantContext

    Represents the tenant context for a given request in a multi-tenant deployment. Attached to UserInfo.TenantContext by server middleware when multi-tenancy is enabled.

    Extensibility: This interface is intentionally minimal. Middle-layer packages (e.g., a SaaS layer) should extend it with richer properties rather than widening this base:

    export interface MySaaSTenantContext extends TenantContext {
    organizationName: string;
    contactID: string;
    // ... additional fields
    }

    Because UserInfo.TenantContext is typed as TenantContext, any subtype satisfies it via structural typing. Hooks in the extending layer can downcast:

    const ctx = contextUser.TenantContext as MySaaSTenantContext;
    
    interface TenantContext {
        Source: "header" | "linkedEntity" | "custom";
        TenantID: string;
    }
    Index

    Properties

    Properties

    Source: "header" | "linkedEntity" | "custom"

    How this tenant context was determined

    TenantID: string

    The unique identifier of the tenant (e.g., OrganizationID value)