Skip to content
Dashboard
Theme
Theme

Role mapping

Use the optional directory role while accounting for evidence differences from SSO.

View Markdown

Directory users and their normal events can carry one optional role, not a per-connection role map. Core evaluates configured role rules in group, primary-email domain and connection-default order. No match means no role.

The directory’s current SCIM memberships provide group evidence. Domain rules use the primary email only when its domain exactly matches an organization-verified domain. A connection-default role applies only when exactly one connection is explicitly bound to the directory; no binding or several bindings skip that class.

For an eligible identity with an unambiguous current bound subject match, shared SCIM groups, verified organization-domain evidence and the single bound-connection default must give the same role as sign-in. SSO and directory roles can still differ: authenticated IdP group claims and OIDC mailbox-verification evidence are available only during sign-in. Directory data does not invent either signal.

Direct user changes recompute before emitting the normal event. Changes to rules, groups, bindings or domains enqueue bounded reprojection; existing directory views can therefore show the prior role until the worker catches up. Inactive, deleted, out-of-domain or invalid sources clear the role. A role change uses the normal user-updated event.

Treat the role as input to your application’s explicit permission model. Scope it by organization and directory, define a least-privilege default for missing or unfamiliar roles, and update permissions when membership or eligibility changes. Deprovisioning still requires your application to revoke sessions and access.

Do not grant administrative access from an unvalidated free-form attribute or email suffix. If your application also maintains its own group-to-permission mapping, document which input is authoritative and prevent conflicting mappings from silently escalating access.

See directory events and sign-in policies for the separate event and admission contracts.