#### [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')

## TenantManager Class

Judges each change of the tenants by the checks the server runs at startup, writes it to the store and has the
catalog read the store again, so the change is served by this instance at once where it can be\.

```csharp
public sealed class TenantManager : Abblix.Oidc.Server.Features.MultiTenancy.ITenantManager
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → TenantManager

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

### Remarks
The changes of this instance are made one at a time, so two of them cannot each pass the checks against a list
the other is about to change\.
### Constructors

## TenantManager\(ILogger\<TenantManager\>, ITenantStore, IEnumerable\<ITenantsCheck\>, StoreTenantCatalog, IOptions\<OidcOptions\>, ITenantStoreWriter\) Constructor {#Abblix.Oidc.Server.Features.MultiTenancy.TenantManager.TenantManager(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.MultiTenancy.TenantManager_,Abblix.Oidc.Server.Features.MultiTenancy.ITenantStore,System.Collections.Generic.IEnumerable_Abblix.Oidc.Server.Features.MultiTenancy.ITenantsCheck_,Abblix.Oidc.Server.Features.MultiTenancy.StoreTenantCatalog,Microsoft.Extensions.Options.IOptions_Abblix.Oidc.Server.Common.Configuration.OidcOptions_,Abblix.Oidc.Server.Features.MultiTenancy.ITenantStoreWriter)}

Judges each change of the tenants by the checks the server runs at startup, writes it to the store and has the
catalog read the store again, so the change is served by this instance at once where it can be\.

```csharp
public TenantManager(Microsoft.Extensions.Logging.ILogger<Abblix.Oidc.Server.Features.MultiTenancy.TenantManager> logger, Abblix.Oidc.Server.Features.MultiTenancy.ITenantStore store, System.Collections.Generic.IEnumerable<Abblix.Oidc.Server.Features.MultiTenancy.ITenantsCheck> checks, Abblix.Oidc.Server.Features.MultiTenancy.StoreTenantCatalog catalog, Microsoft.Extensions.Options.IOptions<Abblix.Oidc.Server.Common.Configuration.OidcOptions> options, Abblix.Oidc.Server.Features.MultiTenancy.ITenantStoreWriter? writer=null);
```
#### Parameters

###### `logger` [Microsoft\.Extensions\.Logging\.ILogger&lt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger-1 'Microsoft\.Extensions\.Logging\.ILogger\`1')[TenantManager](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantManager 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantManager')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger-1 'Microsoft\.Extensions\.Logging\.ILogger\`1') {#Abblix.Oidc.Server.Features.MultiTenancy.TenantManager.TenantManager(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.MultiTenancy.TenantManager_,Abblix.Oidc.Server.Features.MultiTenancy.ITenantStore,System.Collections.Generic.IEnumerable_Abblix.Oidc.Server.Features.MultiTenancy.ITenantsCheck_,Abblix.Oidc.Server.Features.MultiTenancy.StoreTenantCatalog,Microsoft.Extensions.Options.IOptions_Abblix.Oidc.Server.Common.Configuration.OidcOptions_,Abblix.Oidc.Server.Features.MultiTenancy.ITenantStoreWriter).logger}

Records a reading that failed after a change was written\.

###### `store` [ITenantStore](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.ITenantStore 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.ITenantStore') {#Abblix.Oidc.Server.Features.MultiTenancy.TenantManager.TenantManager(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.MultiTenancy.TenantManager_,Abblix.Oidc.Server.Features.MultiTenancy.ITenantStore,System.Collections.Generic.IEnumerable_Abblix.Oidc.Server.Features.MultiTenancy.ITenantsCheck_,Abblix.Oidc.Server.Features.MultiTenancy.StoreTenantCatalog,Microsoft.Extensions.Options.IOptions_Abblix.Oidc.Server.Common.Configuration.OidcOptions_,Abblix.Oidc.Server.Features.MultiTenancy.ITenantStoreWriter).store}

Where the tenants are read from\.

###### `checks` [System\.Collections\.Generic\.IEnumerable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1 'System\.Collections\.Generic\.IEnumerable\`1')[ITenantsCheck](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.ITenantsCheck 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.ITenantsCheck')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1 'System\.Collections\.Generic\.IEnumerable\`1') {#Abblix.Oidc.Server.Features.MultiTenancy.TenantManager.TenantManager(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.MultiTenancy.TenantManager_,Abblix.Oidc.Server.Features.MultiTenancy.ITenantStore,System.Collections.Generic.IEnumerable_Abblix.Oidc.Server.Features.MultiTenancy.ITenantsCheck_,Abblix.Oidc.Server.Features.MultiTenancy.StoreTenantCatalog,Microsoft.Extensions.Options.IOptions_Abblix.Oidc.Server.Common.Configuration.OidcOptions_,Abblix.Oidc.Server.Features.MultiTenancy.ITenantStoreWriter).checks}

The checks of the tenant list, the ones the catalog runs at every reading\.

###### `catalog` [StoreTenantCatalog](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.StoreTenantCatalog 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.StoreTenantCatalog') {#Abblix.Oidc.Server.Features.MultiTenancy.TenantManager.TenantManager(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.MultiTenancy.TenantManager_,Abblix.Oidc.Server.Features.MultiTenancy.ITenantStore,System.Collections.Generic.IEnumerable_Abblix.Oidc.Server.Features.MultiTenancy.ITenantsCheck_,Abblix.Oidc.Server.Features.MultiTenancy.StoreTenantCatalog,Microsoft.Extensions.Options.IOptions_Abblix.Oidc.Server.Common.Configuration.OidcOptions_,Abblix.Oidc.Server.Features.MultiTenancy.ITenantStoreWriter).catalog}

Reads the store again once a change is written\.

###### `options` [Microsoft\.Extensions\.Options\.IOptions&lt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.options.ioptions-1 'Microsoft\.Extensions\.Options\.IOptions\`1')[OidcOptions](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.OidcOptions 'Abblix\.Oidc\.Server\.Common\.Configuration\.OidcOptions')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.options.ioptions-1 'Microsoft\.Extensions\.Options\.IOptions\`1') {#Abblix.Oidc.Server.Features.MultiTenancy.TenantManager.TenantManager(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.MultiTenancy.TenantManager_,Abblix.Oidc.Server.Features.MultiTenancy.ITenantStore,System.Collections.Generic.IEnumerable_Abblix.Oidc.Server.Features.MultiTenancy.ITenantsCheck_,Abblix.Oidc.Server.Features.MultiTenancy.StoreTenantCatalog,Microsoft.Extensions.Options.IOptions_Abblix.Oidc.Server.Common.Configuration.OidcOptions_,Abblix.Oidc.Server.Features.MultiTenancy.ITenantStoreWriter).options}

The server's own settings, the checks judge a tenant with\.

###### `writer` [ITenantStoreWriter](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.ITenantStoreWriter 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.ITenantStoreWriter') {#Abblix.Oidc.Server.Features.MultiTenancy.TenantManager.TenantManager(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.MultiTenancy.TenantManager_,Abblix.Oidc.Server.Features.MultiTenancy.ITenantStore,System.Collections.Generic.IEnumerable_Abblix.Oidc.Server.Features.MultiTenancy.ITenantsCheck_,Abblix.Oidc.Server.Features.MultiTenancy.StoreTenantCatalog,Microsoft.Extensions.Options.IOptions_Abblix.Oidc.Server.Common.Configuration.OidcOptions_,Abblix.Oidc.Server.Features.MultiTenancy.ITenantStoreWriter).writer}

Writes the changes to the store; none when the host writes to its store by other means\.

### Remarks
The changes of this instance are made one at a time, so two of them cannot each pass the checks against a list
the other is about to change\.
### Methods

## TenantManager\.CreateAsync\(TenantDefinition, CancellationToken\) Method {#Abblix.Oidc.Server.Features.MultiTenancy.TenantManager.CreateAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition,System.Threading.CancellationToken)}

Creates [tenant](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantManager#Abblix.Oidc.Server.Features.MultiTenancy.TenantManager.CreateAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition,System.Threading.CancellationToken).tenant 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantManager\.CreateAsync\(Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition, System\.Threading\.CancellationToken\)\.tenant') under a new generation, so nothing kept for an earlier tenant of its id
carries over to it\.

```csharp
public System.Threading.Tasks.Task<Abblix.Utils.Result<Abblix.Oidc.Server.Features.MultiTenancy.StoredTenant,Abblix.Oidc.Server.Features.MultiTenancy.TenantChangeRefusal>> CreateAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition tenant, System.Threading.CancellationToken cancellationToken);
```
#### Parameters

###### `tenant` [TenantDefinition](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition') {#Abblix.Oidc.Server.Features.MultiTenancy.TenantManager.CreateAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition,System.Threading.CancellationToken).tenant}

The tenant to create; its generation is assigned here\.

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

Cancels the change until it is written; after that it only stops the wait for
            this instance to serve the change, which is then reported as made\.

Implements [CreateAsync\(TenantDefinition, CancellationToken\)](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.ITenantManager#Abblix.Oidc.Server.Features.MultiTenancy.ITenantManager.CreateAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition,System.Threading.CancellationToken) 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.ITenantManager\.CreateAsync\(Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition, System\.Threading\.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')[Abblix\.Utils\.Result&lt;](https://www.abblix.com/docs/api/abblix-utils/Abblix.Utils.Result_TSuccess_TFailure_ 'Abblix\.Utils\.Result\`2')[StoredTenant](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.StoredTenant 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.StoredTenant')[,](https://www.abblix.com/docs/api/abblix-utils/Abblix.Utils.Result_TSuccess_TFailure_ 'Abblix\.Utils\.Result\`2')[TenantChangeRefusal](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantChangeRefusal 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantChangeRefusal')[&gt;](https://www.abblix.com/docs/api/abblix-utils/Abblix.Utils.Result_TSuccess_TFailure_ 'Abblix\.Utils\.Result\`2')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
The tenant as stored, or why it was refused\.

#### Exceptions

[System\.InvalidOperationException](https://learn.microsoft.com/en-us/dotnet/api/system.invalidoperationexception 'System\.InvalidOperationException')  
The store registers no [ITenantStoreWriter](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.ITenantStoreWriter 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.ITenantStoreWriter')\.

## TenantManager\.RemoveAsync\(string, string, CancellationToken\) Method {#Abblix.Oidc.Server.Features.MultiTenancy.TenantManager.RemoveAsync(string,string,System.Threading.CancellationToken)}

Removes the tenant stored under [tenantId](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantManager#Abblix.Oidc.Server.Features.MultiTenancy.TenantManager.RemoveAsync(string,string,System.Threading.CancellationToken).tenantId 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantManager\.RemoveAsync\(string, string, System\.Threading\.CancellationToken\)\.tenantId'), while it is stored at
[version](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantManager#Abblix.Oidc.Server.Features.MultiTenancy.TenantManager.RemoveAsync(string,string,System.Threading.CancellationToken).version 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantManager\.RemoveAsync\(string, string, System\.Threading\.CancellationToken\)\.version')\.

```csharp
public System.Threading.Tasks.Task<Abblix.Utils.Result<Abblix.Oidc.Server.Features.MultiTenancy.StoredTenant,Abblix.Oidc.Server.Features.MultiTenancy.TenantChangeRefusal>> RemoveAsync(string tenantId, string version, System.Threading.CancellationToken cancellationToken);
```
#### Parameters

###### `tenantId` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.MultiTenancy.TenantManager.RemoveAsync(string,string,System.Threading.CancellationToken).tenantId}

The id of the tenant to remove\.

###### `version` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.MultiTenancy.TenantManager.RemoveAsync(string,string,System.Threading.CancellationToken).version}

The version the tenant was read at\.

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

Cancels the change until it is written; after that it only stops the wait for
            this instance to serve the change, which is then reported as made\.

Implements [RemoveAsync\(string, string, CancellationToken\)](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.ITenantManager#Abblix.Oidc.Server.Features.MultiTenancy.ITenantManager.RemoveAsync(string,string,System.Threading.CancellationToken) 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.ITenantManager\.RemoveAsync\(string, string, System\.Threading\.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')[Abblix\.Utils\.Result&lt;](https://www.abblix.com/docs/api/abblix-utils/Abblix.Utils.Result_TSuccess_TFailure_ 'Abblix\.Utils\.Result\`2')[StoredTenant](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.StoredTenant 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.StoredTenant')[,](https://www.abblix.com/docs/api/abblix-utils/Abblix.Utils.Result_TSuccess_TFailure_ 'Abblix\.Utils\.Result\`2')[TenantChangeRefusal](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantChangeRefusal 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantChangeRefusal')[&gt;](https://www.abblix.com/docs/api/abblix-utils/Abblix.Utils.Result_TSuccess_TFailure_ 'Abblix\.Utils\.Result\`2')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
The tenant as it was stored, or why the removal was refused\.

#### Exceptions

[System\.InvalidOperationException](https://learn.microsoft.com/en-us/dotnet/api/system.invalidoperationexception 'System\.InvalidOperationException')  
The store registers no [ITenantStoreWriter](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.ITenantStoreWriter 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.ITenantStoreWriter')\.

## TenantManager\.UpdateAsync\(TenantDefinition, string, CancellationToken\) Method {#Abblix.Oidc.Server.Features.MultiTenancy.TenantManager.UpdateAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition,string,System.Threading.CancellationToken)}

Replaces the tenant stored under the id of [tenant](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantManager#Abblix.Oidc.Server.Features.MultiTenancy.TenantManager.UpdateAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition,string,System.Threading.CancellationToken).tenant 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantManager\.UpdateAsync\(Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition, string, System\.Threading\.CancellationToken\)\.tenant'), keeping its generation, while it is
stored at [version](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantManager#Abblix.Oidc.Server.Features.MultiTenancy.TenantManager.UpdateAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition,string,System.Threading.CancellationToken).version 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantManager\.UpdateAsync\(Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition, string, System\.Threading\.CancellationToken\)\.version')\.

```csharp
public System.Threading.Tasks.Task<Abblix.Utils.Result<Abblix.Oidc.Server.Features.MultiTenancy.StoredTenant,Abblix.Oidc.Server.Features.MultiTenancy.TenantChangeRefusal>> UpdateAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition tenant, string version, System.Threading.CancellationToken cancellationToken);
```
#### Parameters

###### `tenant` [TenantDefinition](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition') {#Abblix.Oidc.Server.Features.MultiTenancy.TenantManager.UpdateAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition,string,System.Threading.CancellationToken).tenant}

The tenant as it is to be; a generation it names is not taken, the stored one is kept\.

###### `version` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.MultiTenancy.TenantManager.UpdateAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition,string,System.Threading.CancellationToken).version}

The version the tenant was read at\.

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

Cancels the change until it is written; after that it only stops the wait for
            this instance to serve the change, which is then reported as made\.

Implements [UpdateAsync\(TenantDefinition, string, CancellationToken\)](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.ITenantManager#Abblix.Oidc.Server.Features.MultiTenancy.ITenantManager.UpdateAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition,string,System.Threading.CancellationToken) 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.ITenantManager\.UpdateAsync\(Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition, string, System\.Threading\.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')[Abblix\.Utils\.Result&lt;](https://www.abblix.com/docs/api/abblix-utils/Abblix.Utils.Result_TSuccess_TFailure_ 'Abblix\.Utils\.Result\`2')[StoredTenant](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.StoredTenant 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.StoredTenant')[,](https://www.abblix.com/docs/api/abblix-utils/Abblix.Utils.Result_TSuccess_TFailure_ 'Abblix\.Utils\.Result\`2')[TenantChangeRefusal](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantChangeRefusal 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantChangeRefusal')[&gt;](https://www.abblix.com/docs/api/abblix-utils/Abblix.Utils.Result_TSuccess_TFailure_ 'Abblix\.Utils\.Result\`2')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
The tenant as stored, or why it was refused\.

#### Exceptions

[System\.InvalidOperationException](https://learn.microsoft.com/en-us/dotnet/api/system.invalidoperationexception 'System\.InvalidOperationException')  
The store registers no [ITenantStoreWriter](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.ITenantStoreWriter 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.ITenantStoreWriter')\.
