dotauth

User Provisioning & Role Mapping

These settings decide whether dotCMS creates users at sign-in, how it matches returning users, and which roles they get. They apply to OIDC sign-in, SAML sign-in (with the differences noted in SAML provisioning), and each trusted IdP in headless authentication.

"Apply the same JIT provisioning strategy to interactive SSO and headless exchange."

Auto-Provisioning#


SettingDefaultDescription
Auto-provision new usersOnCreates a dotCMS user on first successful sign-in. When off, only users who already exist in dotCMS can sign in.
Default roles—A comma-separated list of dotCMS role keys given to every provisioned user, for example exampleRole1, exampleRole2. Group mappings add roles on top of these. Include only access that every user in this scope should have, and leave it empty if there's no such role.

How Users Are Matched#


At each sign-in, dotCMS looks for an existing user in this order:

  1. By email, but only when the IdP marks the email as verified (email_verified: true).
  2. By IdP identity: a user ID derived from the provider type, issuer, and subject (sub). It is hashed when Hash user ID is on.

If neither matches and auto-provisioning is on, dotCMS creates a new user. That user gets a random password and cannot use native login unless an administrator resets it. On later sign-ins, dotCMS refreshes the user's first and last name from the IdP.

Role Behavior#


"How dotCMS reconciles a user's roles with the IdP-mapped roles." This setting runs at every sign-in.

Provisioning settings showing the Role behavior options and a Group → role mapping row

OptionWhat happens at each sign-in
Sync all (default)Removes all existing roles, then adds the system access roles, default roles, and IdP group mappings. Keeps roles in sync with the IdP.
IdP groups onlyRemoves all existing roles, then adds only IdP group mappings. No system access roles or default roles are added.
Static onlyRemoves all existing roles, then adds only the system access roles and default roles. IdP groups are ignored.
AdditiveKeeps all existing roles and adds the system access roles and default roles. IdP groups are ignored, and roles are never removed.
NoneDoes not change roles. Manage roles manually in dotCMS.

System access roles are DOTCMS_BACK_END_USER (when Redirect admin panel is on) and/or DOTCMS_FRONT_END_USER (when Redirect site login is on). A user needs the back-end role to use the admin panel.

For a first rollout, start with Additive. It keeps the roles administrators have already assigned in dotCMS, so a mistake in group delivery or mapping can't remove anyone's access. Switch to Sync all only after you've confirmed that the IdP delivers the groups you expect and that each mapping grants the right role. See Rolling out SSO safely.

Group Security (OIDC Only)#


"Controls which IdP groups may resolve to dotCMS roles. Only mapped groups are honored by default."

SettingDefaultDescription
Allow unmapped groupsOffWhen off (recommended), only IdP groups with an explicit mapping grant roles. When on, dotCMS tries any unmapped group name as a dotCMS role key. For example, an IdP group named CMS Administrator would grant the administrator role. Turn this on only for IdP directories you fully control.
Role key filter (regex)—An optional regular expression that each final dotCMS role key must match (substring match), for example ^(dotcms|CMS) . Role keys that don't match are skipped. An invalid pattern blocks all group-derived roles until you fix it.

Group → Role Mappings#


"Apply roles based on IdP group membership." Click Add mapping to add a row:

ColumnExampleNotes
IdP groupdotcms-adminsThe group value exactly as the IdP sends it. Some IdPs send an ID rather than a display name; Microsoft Entra ID, for example, sends group object IDs.
dotCMS roleCMS AdministratorThe dotCMS role key. Case-sensitive.

Without mappings, new users get only the default roles.