# ITenantContext

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.itenantcontext/
> Summary: ITenantContext: Resolves the current request's tenant. In a single-tenant setup, returns a fixed value and requires no additional configuration.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Abstractions.dll</code></div>

Resolves the current request's tenant. In a single-tenant setup, returns a
fixed value and requires no additional configuration.

```csharp
public interface ITenantContext
```

## Remarks

In multi-tenant scenarios, the application binds this interface
to its own identity infrastructure: an HTTP header, a claim, or a subdomain.

## Properties

### <a id="Tracon_ITenantContext_TenantId"></a> TenantId

The current tenant's identifier. Never returns empty.

```csharp
string TenantId { get; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

#### Remarks

**The value must be canonical** — the form
[AmbientTenantScope.Normalize](/api/tracon.ambienttenantscope/#Tracon_AmbientTenantScope_Normalize_System_String_) returns. The tenant
identifier is matched case-insensitively across the product, and every
layer achieves that by normalizing the value rather than by comparing
case-insensitively. An implementation that returns `Acme` where
another path resolves `acme` splits one tenant into two on
PostgreSQL and SQLite, and merges them on SQL Server's default
collation — the authorization layer and the storage layer then disagree.
