OxL Reference

method Principal.dynTenantId

The tenant of a user ("" when there is none).

Example:

oxl✓ checked in CI
fn main() io {
  let p = Principal.User("ann", [], Map.new(), false, "acme")
  print("[{p.dynTenantId()}] [{Principal.Anonymous.dynTenantId()}]")
}
Output
[acme] []
pub(api) fn dynTenantId() -> str

Complexity. O(1).

Since. 1.0.0-beta

Returns

str

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/dynconf.oxl:278

See also