Skip to main content
Table of Contents

Class TenantAccessDeniedException

Namespace
Stratara.Abstractions.Multitenancy
Assembly
Stratara.Abstractions.dll

Thrown by the tenant-isolation pipeline behavior when an ITenantScopedRequest is rejected: either its TenantId does not match the current session's data-owner tenant, or strict mode observed an unauthorized cross-tenant operation.

public sealed class TenantAccessDeniedException : Exception, ISerializable
Inheritance
TenantAccessDeniedException
Implements
Inherited Members
Extension Methods

Remarks

Lives in Stratara.Abstractions so consumers can catch it without referencing the behavior package. ASP.NET hosts translate it to an HTTP 403 (Forbidden) response; worker hosts surface it through their message-failure path.

Constructors

TenantAccessDeniedException(Guid, Guid, string)

Initialise a new TenantAccessDeniedException for a tenant-isolation rejection.

public TenantAccessDeniedException(Guid requestedTenantId, Guid sessionTenantId, string message)

Parameters

requestedTenantId Guid

The data-owner tenant named by the rejected request.

sessionTenantId Guid

The data-owner tenant established on the current session.

message string

A human-readable description of why access was denied.

Properties

RequestedTenantId

The data-owner tenant named by the rejected request.

public Guid RequestedTenantId { get; }

Property Value

Guid

SessionTenantId

The data-owner tenant established on the current session.

public Guid SessionTenantId { get; }

Property Value

Guid