#### [Abblix\.Oidc\.Server](https://www.abblix.com/docs/api/abblix-oidc-server 'index')
### [Abblix\.Oidc\.Server\.Features\.MultiTenancy](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy 'Abblix\.Oidc\.Server\.Features\.MultiTenancy')

## ITenantStore Interface

Holds the tenants a deployment serves, where every instance of the server reads them\.

```csharp
public interface ITenantStore
```

Derived  
↳ [OptionsTenantStore](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.OptionsTenantStore 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.OptionsTenantStore')

### Remarks
The server reads the whole list at startup and again on a timer \([RefreshTenantsEvery](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.OidcOptions#Abblix.Oidc.Server.Common.Configuration.OidcOptions.RefreshTenantsEvery 'Abblix\.Oidc\.Server\.Common\.Configuration\.OidcOptions\.RefreshTenantsEvery')\),
so a tenant the store gains, changes or loses reaches every instance within one period\. A tenant the checks of
the tenant list refuse is left out and logged, and the others are served\. The store assigns each tenant's
[Generation](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition#Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition.Generation 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition\.Generation') when it is created\.

The server takes the tenants of its settings for all its tenants only while the store is
[OptionsTenantStore](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.OptionsTenantStore 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.OptionsTenantStore') itself. Any other, one wrapping it included, is taken to add tenants while the
server runs: the server may start with none, and what the settings' tenants alone decide at startup, such as the
key ring partitions keys may be adopted into, is left to each tenant's arrival.
### Methods

## ITenantStore\.ListAsync\(CancellationToken\) Method {#Abblix.Oidc.Server.Features.MultiTenancy.ITenantStore.ListAsync(System.Threading.CancellationToken)}

Every tenant the store holds\.

```csharp
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Abblix.Oidc.Server.Features.MultiTenancy.StoredTenant>> ListAsync(System.Threading.CancellationToken cancellationToken);
```
#### Parameters

###### `cancellationToken` [System\.Threading\.CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken 'System\.Threading\.CancellationToken') {#Abblix.Oidc.Server.Features.MultiTenancy.ITenantStore.ListAsync(System.Threading.CancellationToken).cancellationToken}

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[System\.Collections\.Generic\.IReadOnlyCollection&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlycollection-1 'System\.Collections\.Generic\.IReadOnlyCollection\`1')[StoredTenant](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.StoredTenant 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.StoredTenant')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlycollection-1 'System\.Collections\.Generic\.IReadOnlyCollection\`1')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')
