How sign-in routing works
aidnn routes sign-in attempts by email domain:- An admin claims and verifies the email domain your employees use (for example
acme.com) by adding a DNS TXT record. - Once a domain is verified, anyone signing in with an email at that domain is routed to your identity provider to authenticate.
- SAML is optional and additive — users whose email is not in a verified domain keep their existing sign-in method (password, magic link, or Google). Enabling SSO for your domain never locks other accounts out of aidnn.
What aidnn reads from the SAML assertion
The first time a verified user signs in through SAML, aidnn creates their account automatically (just-in-time provisioning) from the
email claim.
Role mapping
aidnn resolves each user’s role in a fixed order of precedence. The first rule that produces a role wins:- A role set locally in the Members panel (Take over role assignment). IdP updates never override it until an admin releases the user back to IdP control.
- SCIM group membership, if you provision groups over SCIM and have group-to-role rules configured. The rule highest in your priority list wins.
- A group claim in the SAML assertion — your IdP’s multi-value
groupsclaim, matched against the same priority-ordered rules (first match wins). - A role attribute in the SAML assertion — a single string claim per user
(e.g.
aidnn_role=admin) mapped to an aidnn role. - The configured default role, when nothing above matches.
- SCIM group rules outrank your SAML group claim. For a user whose SCIM groups match a rule, the group claim in their assertion is not consulted.
- Roles are re-evaluated when SCIM group membership changes, not only at sign-in. A user who leaves the last group that granted them a role is moved to the default role. The one exception is the account’s last remaining administrator — see The last-administrator rule.
The last-administrator rule
aidnn will not leave an account with no administrator who can still sign in. If your IdP tries to deactivate, remove, or demote the last such administrator, aidnn accepts the request and reports success to your IdP, but does not apply the change — that account would otherwise have no one able to reach the SSO configuration or the provisioning token, and recovery would need aidnn support. The skip is recorded in the audit log asadmin_floor_protected. If a deprovisioning or
role change appears to have succeeded in your IdP but had no effect in aidnn, this is the
first thing to check. Promote a second administrator, then retry.
Keep at least two administrator accounts so routine offboarding never hits this rule.
Setup at a glance
- Claim your domain in aidnn and verify it with a DNS TXT record.
- Create a SAML app in your identity provider and exchange metadata — aidnn’s ACS URL and SP entity ID for your IdP’s sign-on URL, issuer, and signing certificate.
- Save and enable SAML in aidnn — this generates the per-account service-provider keypair and turns sign-in on.
- Test a round-trip with one assigned user before rolling out.
- (Optional) Map your groups or a role attribute to aidnn roles.