currentTenantId
currentTenantId():
string|undefined
Defined in: tenant-scope.ts:42
Returns the current tenant: that of the innermost runWithTenant call
or running pipeline, or undefined outside both. A running pipeline’s tenant
is its context.tenantId, which it took from here when it started.
Returns
Section titled “Returns”string | undefined
The current tenant id, or undefined for none.
Example
Section titled “Example”runWithTenant('tenant_a', () => currentTenantId()); // 'tenant_a'