An application can correctly identify a user and still return a record from someone else's workspace. In a multi-tenant API, access to a route and access to the specific object are separate decisions. Consider a customer portal where both customers can open the invoice screen. Each should see only the invoices available to the workspace and role they currently hold.
Put the tenant decision near the data
Resolve the caller and the active tenant from trusted server-side context. Load each candidate record within that scope, then apply resource-specific rules such as ownership, delegated access or approval state. Define the policy in one place callers can use consistently. A document ID in a URL or body identifies what the caller requested. The server gives it meaning only after checking the relevant workspace and permissions.
Review operations beyond the main screen
List every way people can reach the same data, including search, nested attachments, user-facing exports and bulk edits. An export worker should inherit an authenticated, bounded job context and apply the policy when it executes if permissions can change while queued. Caches and signed download flows also need explicit tenant scoping. In a bulk operation, decide what response users see when one item falls outside the allowed set.
Write down expected denials
For a representative resource, make a small matrix with two tenants and enough roles to capture the business restrictions. Add cases for a revoked membership, a file attached to a different parent and a batch containing both permitted and forbidden objects. Give product and engineering a shared definition of which requests should succeed, what gets logged and which denials should reveal as little as possible.