Single Sign-On (SSO)
Integrate RapiDesq with your organization's identity provider using OpenID Connect (OIDC) or SAML 2.0. This guide covers end-to-end SSO configuration including domain verification, role mapping, just-in-time provisioning, and enforcement with per-user exemptions. Single sign-on is available on the Enterprise plan.
Overview
Single Sign-On allows your team to authenticate with RapiDesq using the same credentials they use for every other corporate application. Instead of managing a separate set of passwords, users sign in through your organization's identity provider (IdP) and are granted access to RapiDesq automatically.
SSO in RapiDesq provides the following capabilities:
- Centralized authentication — Users authenticate once through your IdP. Your security policies, multi-factor authentication requirements, and session controls all apply automatically.
- No separate passwords — SSO-provisioned users never create or manage a RapiDesq-specific password. This eliminates password-related support tickets and reduces the attack surface from credential reuse.
- Just-In-Time (JIT) provisioning — The first time an SSO user signs in, RapiDesq automatically creates their account, populates their profile from IdP claims, and assigns their role based on your mapping rules. No manual user invitations are required.
- Domain-based auto-detection — Register and verify your email domains so that users are automatically routed to the correct IdP at login based on their email address. No special login URLs or bookmarks are needed.
- Enforcement with exemptions — Require SSO across the tenant or per domain, with a per-user exemption list and built-in lockout protection for owner accounts.
RapiDesq supports two industry-standard protocols:
- OpenID Connect (OIDC) — A modern, lightweight protocol built on OAuth 2.0. Recommended for most integrations.
- SAML 2.0 — A widely adopted enterprise protocol. Use this if your IdP requires it or if your organization has existing SAML infrastructure.
Compatible identity providers include Okta, Azure AD (Microsoft Entra ID), Google Workspace, Auth0, Keycloak, OneLogin, PingFederate, and any other provider that implements the OIDC or SAML 2.0 specifications.
Prerequisites
Before you begin configuring SSO, confirm that you have the following:
- Admin access to RapiDesq — You need administrator access to open Admin > SSO.
- Admin access to your identity provider — You will need to create an application registration in your IdP (for example, an "App Integration" in Okta or an "Enterprise Application" in Azure AD).
- Ability to register applications in your IdP — This includes configuring redirect URIs, downloading metadata, and managing group/claim configurations.
- Ability to verify your domain — Domain mappings must be verified. The primary method is a DNS TXT record; an HTML meta tag on your website's homepage or an uploaded verification file are also supported if you can't change DNS.
The SSO page (Admin > SSO) is organized into a Login policy section and three tabs: Identity Providers, Domain Mappings, and Role Mappings.
The SSO page: login policy at the top, with tabs for identity providers, domain mappings, and role mappings.
Configuring OIDC
OpenID Connect is the recommended protocol for SSO integration. OIDC is simpler to configure than SAML and uses modern REST-based flows. If your identity provider supports both OIDC and SAML, choose OIDC.
Step 1: Register an application in your IdP
Create a new OIDC (or OAuth 2.0 / OpenID Connect) application in your identity provider. The exact steps depend on your IdP:
- Okta — Go to Applications > Create App Integration, select OIDC - OpenID Connect, then Web Application.
- Azure AD (Entra ID) — Go to Azure Portal > App registrations > New registration, select Web as the platform.
- Google Workspace — Go to Google Cloud Console > APIs & Services > Credentials > Create OAuth client ID, select Web application.
- Auth0 — Go to Applications > Create Application, select Regular Web Applications.
- Keycloak — Go to Clients > Create Client, set the Client Protocol to openid-connect.
Step 2: Configure the redirect URI
In your IdP's application settings, set the redirect URI (also called the callback URL or sign-in redirect URI) to RapiDesq's OIDC callback endpoint. The callback is served at the path /api/v1/auth/sso/oidc/callback on your RapiDesq account's API host. This is the endpoint your IdP sends users back to after authentication.
Step 3: Copy your Client ID and Client Secret
After creating the application in your IdP, it will provide you with a Client ID and a Client Secret. Copy both values; you will need them in the next step.
Step 4: Configure scopes in your IdP
Ensure that the following OIDC scopes are enabled for the application in your IdP:
openid— Required. Identifies this as an OIDC authentication request.profile— Provides the user's name and basic profile information.email— Provides the user's email address.
If your IdP uses a custom scope or claim for group memberships (used for role mapping), add that scope as well. For example, Okta uses a groups claim, and Azure AD uses a groups optional claim.
Step 5: Create the provider in RapiDesq
In Admin > SSO, on the Identity Providers tab, click Create Provider. The creation wizard walks through Basic Info, protocol configuration, and a final Review step. Enter:
- Provider Name — A display name (for example, "Okta" or "Azure AD").
- Protocol — Select OpenID Connect (OIDC).
- Issuer URL — The OpenID Connect issuer URL of your IdP. Examples:
- Okta:
https://your-org.okta.comorhttps://your-org.okta.com/oauth2/default - Azure AD:
https://login.microsoftonline.com/{tenant-id}/v2.0 - Google:
https://accounts.google.com - Auth0:
https://your-tenant.auth0.com - Keycloak:
https://your-keycloak.com/realms/{realm-name}
- Okta:
- Client ID — The Client ID from Step 3.
- Client Secret — The Client Secret from Step 3.
- Scopes — A space-separated list of scopes;
openidis required. The typical value isopenid profile email.
PKCE support
RapiDesq supports PKCE, an additional security layer for the authorization code flow. To enable it, check Use PKCE (Recommended) in the OIDC configuration. Most modern identity providers support and encourage PKCE; ensure that your IdP's application registration also allows or requires it.
Step 6: Verify the sign-in flow
After saving the provider and configuring a verified domain mapping (see below), test the full round-trip by signing in through your IdP in a private browser window. See Testing SSO for the recommended procedure.
Configuring SAML
If your identity provider requires SAML 2.0 or your organization has existing SAML infrastructure, follow these steps to configure SAML-based SSO.
Step 1: Get RapiDesq's Service Provider (SP) details
RapiDesq acts as the SAML Service Provider (SP). Your IdP needs RapiDesq's SP details to establish the trust relationship.
- Navigate to Admin > SSO and open the Identity Providers tab.
- The Service Provider (SP) Configuration panel shows the values to provide to your IdP:
- Entity ID (Audience URI) — Also known as Audience URI or Audience Restriction in some IdPs.
- ACS URL (Reply URL) — Also known as Reply URL, Assertion Consumer Service URL, or Single Sign-On URL.
- You can copy these values individually, or click Download Metadata to download the SP metadata XML file and upload it to your IdP — the easiest method, because it includes all required configuration automatically.
Step 2: Create a SAML application in your IdP
In your identity provider, create a new SAML 2.0 application:
- Okta — Go to Applications > Create App Integration, select SAML 2.0.
- Azure AD (Entra ID) — Go to Enterprise Applications > New application > Create your own application, select Integrate any other application, then configure SAML under Single sign-on.
- Google Workspace — Go to Admin Console > Apps > Web and mobile apps > Add app > Add custom SAML app.
- Keycloak — Go to Clients > Create Client, set the Client Protocol to saml.
When configuring the application, provide the Entity ID and ACS URL from Step 1, or upload the downloaded SP metadata file.
Step 3: Configure attribute mapping in your IdP
Configure your IdP to include the following attributes in the SAML assertion. RapiDesq uses these to identify and provision users:
| SAML Attribute | Description | Required |
|---|---|---|
email or NameID |
The user's email address. Used as the primary identifier. | Yes |
firstName / givenName |
The user's first name. | Recommended |
lastName / surname |
The user's last name. | Recommended |
groups or roles |
The user's group or role memberships in the IdP. Used for role mapping. | Recommended |
Step 4: Create the provider in RapiDesq
On the Identity Providers tab, click Create Provider, enter a Provider Name, and select SAML 2.0 as the protocol. You can import your IdP's configuration in one of two ways:
- Upload Metadata File — Upload the SAML metadata XML file downloaded from your IdP. RapiDesq parses the Entity ID, SSO URL, and signing certificate automatically.
- Metadata URL — Enter the URL where your IdP publishes its metadata and click Fetch.
After importing, review the populated fields and make any necessary adjustments. You can also enter the values manually:
- IdP Entity ID — The Entity ID of your identity provider.
- IdP SSO URL — The Single Sign-On URL from your IdP.
- IdP SLO URL (optional) — The Single Logout URL from your IdP.
- IdP Certificate — The X.509 signing certificate from your IdP, in PEM format.
- Name ID Format — Email Address, Unspecified, Persistent, or Transient.
Step 5: Configure signing options
Two signing options control the security posture of the SAML exchange:
- Sign AuthnRequests — RapiDesq signs the authentication requests it sends to your IdP.
- Require Signed Assertions — RapiDesq rejects assertions that are not signed by your IdP. Assertion signing is standard and typically enabled by default in IdPs.
Domain Mappings & Verification
Domain mappings provide a seamless login experience. When a user enters their email address on the RapiDesq login page, the system checks the domain portion (the part after the @) against your verified domain mappings. If a match is found, the user is automatically redirected to the mapped identity provider without any additional steps.
Adding a domain mapping
- Navigate to Admin > SSO and open the Domain Mappings tab. (At least one identity provider must exist before you can add a mapping.)
- Click Add Domain Mapping.
- Enter the email domain you want to register (for example,
example.com). Do not include the@symbol. - Select the Identity Provider the domain should map to.
- Choose a Verification Method (see below) and save. The mapping starts in a Pending Verification state.
Verifying domain ownership
Domain verification proves that your organization owns the domain. This prevents unauthorized parties from claiming your domain and redirecting your users to a malicious IdP. Three verification methods are available:
- DNS TXT Record — Add the TXT record shown in RapiDesq to your domain's DNS configuration. This is the recommended method.
- HTML Meta Tag — Add the provided meta tag inside the
<head>section of your website's homepage. - File Upload — Create a file named
rapidesq-verification.txtwith the provided content and place it at the location shown, accessible via HTTPS without authentication.
After completing the step for your chosen method, click Verify. RapiDesq checks for the record, tag, or file and marks the mapping Verified on success. If verification fails, the page shows what was checked, what was expected, and what was found, so you can correct the record.
Multiple domains
Organizations with multiple email domains (for example, yourcompany.com, yourcompany.co.uk, and subsidiary.com) can add a mapping for each and point them at the same identity provider. Each domain must be verified independently.
Users with non-SSO domains
Users whose email domains are not mapped for SSO continue to use standard password-based login (subject to your login policy — see Enforcing SSO). This is common for external collaborators, contractors, or partners who do not authenticate through your corporate IdP.
Role Mapping
Role mappings define how roles from your identity provider map to RapiDesq roles. When a user signs in via SSO and their account is provisioned, their IdP roles are matched against these mappings to determine the RapiDesq role they receive. This eliminates the need to manually configure each user.
RapiDesq reads role information from the standard role and group claims in the IdP response — for OIDC this includes the roles and groups claims (including Keycloak-style realm and client role claims); for SAML, the group/role attributes in the assertion.
Configuring role mappings
Role mappings are configured per identity provider:
- On the Identity Providers tab, click Role Mappings on the provider's row. This opens the Role Mappings tab for that provider.
- Click Add Mapping.
- Configure the mapping:
- External Role (from IdP) — The role or group name exactly as it appears in your IdP. For example:
admin,supervisor,support-user. - Internal Role — The RapiDesq role to assign when the external role matches:
- Admin — Administrative access including tenant configuration and settings.
- Supervisor — Team management, queue oversight, reporting, and user supervision.
- User — Handle conversations, manage tickets, and interact with contacts.
- Internal User — Internal collaboration features such as team chat, without customer-facing capabilities.
- Priority — A numeric value (default 0). When a user matches multiple mapping rules, higher priority mappings take precedence.
- External Role (from IdP) — The role or group name exactly as it appears in your IdP. For example:
- Click Create.
To change the external role of an existing mapping, delete the mapping and recreate it; the internal role and priority can be edited in place.
Example mappings
| External Role (from IdP) | Internal Role | Priority |
|---|---|---|
rapidesq-admins |
Admin | 100 |
support-supervisors |
Supervisor | 80 |
support-users |
User | 60 |
all-employees |
Internal User | 10 |
In this example, a user who belongs to both rapidesq-admins and all-employees would be assigned the Admin role because it has the higher priority (100 vs 10).
Default role
Users who sign in via SSO without matching any mapping — including tenants with no role mappings configured at all — are assigned the User role by default. The Role Mappings tab shows a warning when no mappings are configured so this default doesn't surprise you.
Just-In-Time (JIT) User Provisioning
Just-In-Time provisioning automatically creates user accounts in RapiDesq the first time an SSO user signs in. This eliminates the manual step of inviting or creating users ahead of time.
How JIT provisioning works
- A user navigates to the RapiDesq login page and enters their email address.
- The domain portion of the email matches a verified domain mapping, and the user is redirected to the mapped IdP.
- The user authenticates with the IdP.
- The IdP sends an assertion (SAML) or ID token (OIDC) back to RapiDesq with the user's claims. RapiDesq validates that the email domain returned by the IdP matches the provider's verified domain mapping.
- RapiDesq checks whether a user account exists for this identity. If not, a new account is created automatically:
- Email is set from the
emailclaim. - Name is populated from the
given_name,family_name, andnameclaims (OIDC) or the first/last name attributes (SAML). - Role is assigned based on the role mapping rules. If no mapping matches, the User role is used.
- Email is set from the
- The user is logged in and has immediate access to RapiDesq based on their assigned role.
Existing accounts and account linking
If a user already has a RapiDesq account with a password and then signs in via SSO with the same email address, RapiDesq does not silently merge the identities. The user is asked to confirm the link by entering their existing RapiDesq password. This prevents account takeover through a misconfigured or malicious IdP. Accounts that were originally created by SSO link automatically.
Subsequent logins
On each subsequent login, RapiDesq refreshes the user's first and last name from the IdP claims, so name changes in your directory are reflected in RapiDesq. Role changes are applied through RapiDesq's user management — update the user's role in Admin > User Management if their responsibilities change after provisioning.
Testing SSO
Thoroughly test your SSO configuration before rolling it out to your entire organization. Follow these steps:
1. Test in a private browser window
Open an incognito or private browser window (this ensures no existing sessions interfere with the test):
- Navigate to your RapiDesq login page.
- Enter an email address with your verified SSO domain.
- Verify that you are redirected to your identity provider's login page.
- Authenticate with your IdP credentials.
- Verify that you are returned to RapiDesq and logged in successfully.
- Check that your role and permissions are correct by navigating to your profile or checking available menu items.
2. Test JIT provisioning
Create a test user in your IdP who does not yet have an account in RapiDesq. Have them sign in via SSO and verify:
- A new user account is created automatically in RapiDesq.
- The user's name and email are populated correctly from IdP claims.
- The user is assigned the expected role based on role mapping rules.
3. Test role mapping
Test with new users who belong to different IdP groups to verify that each mapping produces the correct RapiDesq role:
- Test a user in your admin group and verify they receive the Admin role.
- Test a user in your users group and verify they receive the User role.
- Test a user who does not match any mapping and verify they receive the default User role.
- Test a user who matches multiple mappings and verify that the highest-priority mapping wins.
4. Keep a backup admin session
While testing, always keep an active admin session open in your regular (non-incognito) browser. If something goes wrong with the SSO configuration, you can use this session to make corrections without needing to authenticate via SSO.
Enforcing SSO
After testing is complete and SSO is working reliably, you can require SSO so that password-based login is blocked. RapiDesq provides enforcement at two levels: a per-domain requirement and a tenant-wide login policy.
Per-domain enforcement
Each domain mapping has a Require SSO option. When enabled, users with that email domain must authenticate via SSO; password login is blocked for them. Domains without the requirement show SSO as Optional, meaning users are routed to SSO automatically but can still use a password where the login policy allows it.
Tenant login policy
The Login policy section at the top of the SSO page controls whether users in your tenant must sign in via SSO. Three settings are available:
- Allow password login — The default. Users may sign in with a password or SSO.
- Require SSO with exceptions — All users must sign in via SSO except those on the per-user exemption list.
- Require SSO for all users — All users except tenant owners must sign in via SSO.
Owner accounts are always exempt from SSO enforcement to prevent lockouts: if your IdP is misconfigured or experiences an outage, owners can still sign in with a password and adjust the policy.
Switching to Require SSO for all users is deliberately high-friction: a confirmation dialog warns that every non-owner user will be blocked from password login, and you must type REQUIRE to confirm.
Per-user exemptions
When using Require SSO with exceptions, the Per-user exemptions list controls who may continue to sign in with a password. Add users by searching by email or name. Use exemptions sparingly — they are intended for service accounts and edge cases, not as a general escape hatch.
Managing Multiple Providers
You can configure more than one identity provider — useful during an IdP migration or for organizations with multiple directories. Each provider can be enabled or disabled independently, and one provider can be designated the Primary Provider using Set as Primary. Domain mappings determine which provider each email domain routes to.
Tips & Best Practices
- Prefer OIDC over SAML when possible — OIDC is simpler to configure, uses modern REST-based flows, and generally requires less troubleshooting. If your IdP supports both protocols, choose OIDC.
- Set up role mappings before rolling out — Roles are assigned when accounts are first provisioned. Mappings added later only affect users who haven't signed in yet; existing users' roles are managed in User Management.
- Use JIT provisioning to eliminate manual user management — Combined with role mapping, JIT provisioning means new employees get a working RapiDesq account on their first login. No manual invitation, no waiting for IT to set up accounts.
- Verify domains with DNS TXT records — Domain verification prevents unauthorized parties from claiming your email domain and redirecting your users to a malicious identity provider. DNS verification is the most robust of the three methods.
- Enable PKCE for OIDC connections — PKCE adds an extra layer of security to the authorization code flow with no downside. Enable it if your IdP supports it.
- Import SAML configuration from metadata — Uploading your IdP's metadata file or fetching its metadata URL is less error-prone than manual entry and captures the signing certificate exactly. Re-import after certificate rotations.
- Review role mappings as your organization changes — As teams are reorganized and IdP groups are renamed or restructured, audit your role mappings so newly provisioned users receive the correct access level.
- Use the highest-privilege-wins priority pattern — Assign the highest priority number to the most privileged role, so users who belong to multiple IdP groups receive the most appropriate access level.
- Roll out enforcement in stages — Start with the default login policy and domain auto-detection, verify JIT provisioning and role mapping with a pilot group, then move to Require SSO with exceptions before considering Require SSO for all users.
- Coordinate IdP application changes with RapiDesq configuration — Changes such as rotating a Client Secret in your IdP must be reflected in RapiDesq immediately. Plan these changes during a maintenance window, update both sides together, and test immediately afterward.