The three kinds of caller
- A signed-in person: resolve the organization from the verified session's membership record.
- A provider callback: resolve it from something the provider signed — the connected account, the destination phone number, the page identifier.
- A scheduled job: resolve it from explicit job configuration, never from data the job happens to be processing.
What to do with a client-supplied organization value
Do not ignore it and do not trust it. Compare it against the resolved authority. If they match, the request is consistent and proceeds. If they differ, that is an attempted cross-tenant write: reject it and record it, because a mismatch is signal, not noise.
Identifiers are claims too
Tenant resolution alone is not enough. A caller — including a language model working from remembered context — can supply a record identifier that belongs to someone else, or that does not exist at all. Every identifier that arrives from outside must be checked for existence and for tenancy before it is used, not after the write.