SSO & Authentication
Path: /settings/single-sign-on
SSO configuration requires the Infrastructure Enterprise or Ultimate tier, except Google OAuth which is available on all tiers.
Access: Admins only.
Realm9 supports single sign-on via two working providers: Google OAuth and Azure AD (SAML 2.0). Once configured, users can sign in with their identity provider credentials and are automatically provisioned on first login (JIT provisioning).
Supported Providers
| Provider | Protocol | Tier |
|---|---|---|
| OAuth / OIDC | All tiers | |
| Azure AD | SAML 2.0 | Enterprise / Ultimate |
Setting Up Google OAuth
- Navigate to Settings → Single Sign-On → Configurations
- Click Add Provider and select Google
- Fill in the required fields:
| Field | Required | Notes |
|---|---|---|
| Display Name | Yes | Shown on the login page (max 20 characters) |
| Client ID | Yes | From Google Cloud Console → OAuth 2.0 credentials |
| Client Secret | Yes | From Google Cloud Console → OAuth 2.0 credentials |
| Domain | Yes | Select from your organisation's verified email domains |
| Authorization URL | No | Pre-filled with Google default |
| Token URL | No | Pre-filled with Google default |
| User Info URL | No | Pre-filled with Google default |
| Enforce MFA | No | Toggle — informational only, does not enforce MFA at the IdP level |
- Click Save, then Test Connection to verify
Getting Google credentials:
- Go to Google Cloud Console → APIs & Services → Credentials
- Create an OAuth 2.0 Client ID (Web application)
- Add your Realm9 callback URL as an authorised redirect URI:
https://<your-realm9-instance>/api/auth/sso/google/callback
Setting Up Azure AD (SAML)
- Navigate to Settings → Single Sign-On → Configurations
- Click Add Provider and select Azure AD (SAML)
- Download the SP Metadata XML from the dialog and upload it to your Azure AD Enterprise Application
- Import your IdP metadata — either paste the metadata URL from Azure AD or upload the metadata XML file. Realm9 parses the following from the metadata:
- IdP Issuer
- SSO URL
- Single Logout URL
- IdP Certificate
| Field | Required | Notes |
|---|---|---|
| Display Name | Yes | Shown on the login page (max 20 characters) |
| Domain | Yes | Select from your organisation's verified email domains |
| IdP Metadata | Yes | URL or file upload from Azure AD |
| Role Mapping | No | JSON mapping of Azure AD groups to Realm9 roles (see Role Mapping below) |
| Enforce MFA | No | Toggle — informational only |
- Click Save, then Test Connection to verify
Azure AD setup steps:
- In Azure Portal → Enterprise Applications → New Application → Create your own
- Set up SAML single sign-on
- Upload the SP Metadata XML downloaded from Realm9 — this populates the Entity ID and Reply URL automatically
- Copy the App Federation Metadata URL and paste it into Realm9's metadata URL field
Updating the certificate: Azure AD certificates expire periodically. To update, re-import the IdP metadata — Realm9 parses the latest certificate from the metadata file automatically.
JIT Provisioning
When a user signs in via SSO for the first time, Realm9 automatically creates their account — no admin invite required.
How it works:
- The user's email domain must match a verified domain on your organisation with auto sign-up enabled
- New users are created with the User role by default (overridden by role mapping if configured)
- If Require Approval is enabled on the domain, the new user gets
Pending Approvalstatus and cannot access Realm9 until an admin approves them - Existing users can always sign in via SSO regardless of domain settings
Configure domain auto sign-up and approval settings at Settings → Organisation → Domain Management.
Role Mapping
Role mapping automatically assigns Realm9 roles to users based on their Azure AD group memberships, applied at every login.
Enable Role Mapping on the provider configuration and provide a JSON mapping:
{
"groups": {
"realm9-admins": "ADMIN",
"realm9-provisioners": "PROVISIONER",
"realm9-viewers": "VIEWER"
}
}
Behaviour:
- Group names are matched against the groups claim in the SAML assertion
- The highest-privilege matching role is applied
- For existing users: role mapping only upgrades privileges — it never downgrades
- For new JIT-provisioned users: the mapped role is set directly
- If no groups match, the user keeps their current role (or gets the default User role if new)
Health Monitoring
Path: /settings/single-sign-on/health
The health dashboard monitors the status of all SSO providers and automatically manages a circuit breaker to protect your users from a degraded IdP.
Health Statuses
| Status | Meaning |
|---|---|
| Healthy | Provider is responding normally |
| Degraded | Provider is responding but with errors or slow responses |
| Unhealthy | Provider is failing health checks |
| Offline | Provider is unreachable |
| Unknown | Health check has not run yet |
Circuit Breaker States
| State | Meaning |
|---|---|
| Closed (Normal) | SSO logins flow through normally |
| Open (Blocked) | Too many failures detected — SSO logins are blocked to prevent repeated failures |
| Half-open (Testing) | Circuit is testing recovery — one successful login will close it |
The circuit breaker opens automatically after 5 consecutive failures and attempts recovery after 1 minute.
Actions
- Check Now — trigger an immediate health check on any provider
- Open Circuit — manually block SSO logins for a provider (requires a reason)
- Close Circuit — manually reset the circuit breaker and restore SSO logins
The health dashboard auto-refreshes every 30 seconds and shows last check time, next scheduled check, consecutive failure count, and the last error message per provider.
SSO Migrations
Path: /settings/single-sign-on/migrations
Requires Infrastructure Enterprise or Ultimate tier.
SSO Migrations let you move users from one identity provider to another in a controlled, reversible way — for example, migrating from Google to Azure AD.
Migration Flow
- Plan — select source and target providers, configure batch size, strategy, and whether to run as a dry run first
- Execute — Realm9 processes users in batches, updating their SSO provider link
- Rollback (if needed) — revert all migrated users back to the source provider
Migration Settings
| Setting | Notes |
|---|---|
| Source Provider | The current SSO provider users are migrating from |
| Target Provider | The new SSO provider |
| Strategy | Manual (start immediately), Scheduled (set a start time), or Pilot (small batch first) |
| Batch Size | Number of users processed per batch (default: 10) |
| Scheduled Start | Date and time — shown only for Scheduled strategy |
| Dry Run | Simulates the migration without making any changes (recommended first) |
| Auto Rollback on Error | Automatically rolls back if any users fail to migrate |
| Notes | Optional notes for the migration record |
Migration Statuses
| Status | Meaning |
|---|---|
| Planning | Migration created, not yet started |
| Scheduled | Waiting for the configured start time |
| In Progress | Actively migrating users |
| Paused | Migration paused mid-run |
| Completed | All users successfully migrated |
| Failed | Migration encountered errors |
| Rolled Back | Migration was reverted |
SCIM Provisioning
Path: /settings/single-sign-on/scim
Requires Infrastructure Enterprise or Ultimate tier.
SCIM 2.0 allows your identity provider (Azure AD, Okta, etc.) to automatically provision, update, and deprovision users in Realm9.
Setup
- Navigate to Settings → Single Sign-On → SCIM
- Click Create Token, enter a name and optional expiry
- Copy the token — it is shown only once
- In your IdP, configure SCIM provisioning with:
- SCIM Base URL:
https://<your-realm9-instance>/api/scim/v2 - Authentication: Bearer token (paste the token you just copied)
- SCIM Base URL:
Default Provisioning Role
Set the role automatically assigned to users provisioned via SCIM. Options: Viewer, User, Provisioner, Admin. This role can be overridden per user via group-to-role mapping on login.
Supported Operations
| Operation | Users | Groups |
|---|---|---|
| List | ✓ | ✓ |
| Create | ✓ | ✓ |
| Get by ID | ✓ | ✓ |
| Update (PUT) | ✓ | ✓ |
| Patch (PATCH) | ✓ | ✓ |
| Delete | ✓ | ✓ |
| Bulk operations | ✓ | ✓ |
SCIM group changes automatically recalculate user roles based on the group-to-role mapping configured on your SSO provider.
Token Management
- Tokens are stored as hashed values — the plain token is shown only at creation
- Each token shows: name, status (active / expired), created date, last used date, expiry date
- Delete a token to immediately revoke access
Role-Based Access
| Action | Viewer | User | Provisioner | Admin |
|---|---|---|---|---|
| View SSO configurations | — | — | — | ✓ |
| Add / edit / delete providers | — | — | — | ✓ |
| Test connections | — | — | — | ✓ |
| View health dashboard | — | — | — | ✓ |
| Trigger health checks / manage circuit breaker | — | — | — | ✓ |
| Manage migrations | — | — | — | ✓ |
| Manage SCIM tokens | — | — | — | ✓ |
