Configuring SSO with Auth0

This guide walks you through setting up SAML-based Single Sign-On (SSO) between Auth0 and StatusDrift. Auth0’s flexible identity platform allows you to connect StatusDrift with your existing user database, social providers, or enterprise identity systems.

Prerequisites

Before you begin, ensure you have:

  • Auth0 account with Admin access
  • StatusDrift Organization Owner or Admin role
  • A StatusDrift Business plan, which includes SSO

Step 1: Start SAML Configuration in StatusDrift

1. Sign in to StatusDrift, go to Account Settings (Settings in the account menu at the top right), and select the Organization tab. Scroll down to SAML Single Sign-On and click Add SAML Provider.

2. Enter an Alias (for example, auth0; only letters, numbers, hyphens, and underscores) and a Display Name (for example, Sign in with Auth0), then click Create & Continue.

3. StatusDrift will display your Service Provider (SP) metadata. Keep this dialog open, or click Save & Close and resume the setup later. You will need these values:

  • ACS URL (Assertion Consumer Service URL): Where Auth0 sends SAML responses
  • Entity ID (Audience): StatusDrift’s unique identifier
  • SLS URL: Single Logout Service URL
Configure Identity Provider step of the SAML SSO setup wizard, showing the SP entity ID, ACS URL, SLS URL, SP metadata URL and Universal Logout URL, each with a copy button.
StatusDrift displays the SP metadata needed for your identity provider configuration

Step 2: Create an Application in Auth0

1. Sign in to the Auth0 Dashboard.

2. Navigate to Applications > Applications.

3. Click + Create Application.

4. Enter a name (e.g., “StatusDrift”) and select Regular Web Applications.

5. Click Create.

Step 3: Enable SAML2 Web App Addon

Auth0 uses “Addons” to enable SAML functionality:

1. In your application settings, navigate to the Addons tab.

2. Enable the SAML2 Web App addon by clicking on it.

3. In the Settings tab of the addon modal, configure the following:

{
  "audience": "YOUR_STATUSDRIFT_ENTITY_ID",
  "recipient": "YOUR_STATUSDRIFT_ACS_URL",
  "destination": "YOUR_STATUSDRIFT_ACS_URL",
  "nameIdentifierFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",
  "nameIdentifierProbes": [
    "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
  ]
}

Replace the placeholder values with the actual values from StatusDrift’s SP metadata.

Step 4: Configure Attribute Mappings

Add attribute mappings to the SAML2 addon configuration to pass user information to StatusDrift:

{
  "audience": "YOUR_STATUSDRIFT_ENTITY_ID",
  "recipient": "YOUR_STATUSDRIFT_ACS_URL",
  "destination": "YOUR_STATUSDRIFT_ACS_URL",
  "nameIdentifierFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",
  "nameIdentifierProbes": [
    "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
  ],
  "mappings": {
    "email": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress",
    "firstName": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname",
    "lastName": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname"
  },
  "passthroughClaimsWithNoMapping": false
}

Click Enable to save the addon configuration.

Step 5: Get Auth0 IdP Metadata

After enabling the SAML2 addon, navigate to the Usage tab in the addon modal. You’ll find:

  • Identity Provider Login URL: The SSO endpoint
  • Identity Provider Certificate: Download the X.509 certificate
  • Issuer: Auth0’s Entity ID (typically urn:YOUR_TENANT.auth0.com)

You can also download the complete IdP metadata XML from this tab.

Step 6: Configure Connections (Optional)

Auth0 allows you to configure which identity sources (connections) users can authenticate with:

1. In your application, navigate to the Connections tab.

2. Enable the connections you want to allow:

  • Database: Auth0’s built-in user database
  • Social: Google, GitHub, LinkedIn, etc.
  • Enterprise: ADFS, Azure AD, LDAP, SAML, etc.

This flexibility allows Auth0 to act as an identity broker, federating authentication from multiple sources.

Step 7: Complete Configuration in StatusDrift

Return to StatusDrift. If you closed the setup dialog, click Resume next to your provider under SAML Single Sign-On. Click Continue to Step 3 and enter the Auth0 IdP details:

1. IdP Entity ID: The Issuer from Auth0 (e.g., urn:your-tenant.auth0.com)

2. IdP SSO URL: The Identity Provider Login URL from Auth0

3. IdP X.509 Certificate: Paste the certificate downloaded from Auth0

4. Configure optional settings:

  • Just-In-Time User Provisioning: Automatically create StatusDrift accounts for new users
  • Enforce for Domain: Your company’s email domain, for example example.com. StatusDrift uses it to send users to Auth0 when they sign in with SSO for the first time

5. Click Complete Setup. Then turn on the Enabled switch for the provider in the SAML Single Sign-On list. A new provider stays disabled until you turn it on.

Enter IdP Details step of the SAML SSO setup wizard with fields for the IdP entity ID, SSO URL, SLO URL and X.509 certificate, the name ID format and group attribute, and the SSO behavior settings.
Enter your identity provider details to complete the SAML configuration

Step 8: Configure Role Mapping with Auth0 Rules

To pass role information to StatusDrift, you can use Auth0 Actions (or legacy Rules) to add a groups claim:

1. In Auth0, navigate to Actions > Flows > Login.

2. Click + to add a custom action.

3. Create an action that adds roles to the user’s SAML assertion:

exports.onExecutePostLogin = async (event, api) => {
  const namespace = 'https://statusdrift.com';
  
  // Get roles from user metadata or app_metadata
  const roles = event.user.app_metadata?.roles || ['Viewer'];
  
  // Add roles to SAML assertion
  api.samlResponse.setAttribute('groups', roles);
};

4. Deploy the action and add it to the Login flow.

Then configure role mapping in StatusDrift:

1. Go to Account Settings > Organization > SAML Single Sign-On, click Edit (the pencil icon) next to your provider, and open the Group Mappings tab.

2. Click Add Mapping for each Auth0 role. Enter the role name in SAML Group Name, set Target Type to Organization Role, and select the StatusDrift Role.

Testing Your Configuration

Before enforcing SSO for all users:

1. Open an incognito/private browser window.

2. Navigate to your StatusDrift login page.

3. Click Sign in with SSO, enter your work email, and click Continue with SSO.

4. You should be redirected to Auth0’s Universal Login page.

5. Authenticate with your chosen method (database, social, or enterprise connection).

6. After authenticating, you should be redirected back to StatusDrift and signed in.

Troubleshooting

Error: “Invalid callback URL”

The ACS URL in your SAML2 addon configuration doesn’t match StatusDrift’s expected URL. Verify the recipient and destination values match the ACS URL from StatusDrift exactly.

Error: “Audience mismatch”

The audience value in your SAML2 addon doesn’t match StatusDrift’s Entity ID. Copy the exact Entity ID value from StatusDrift’s SP metadata.

Error: “No email in SAML response”

The NameID is not configured to use email format. Ensure your SAML2 addon configuration includes the correct nameIdentifierFormat and nameIdentifierProbes settings.

Social login not working

Verify that the social connection is enabled for your StatusDrift application in Auth0’s Connections tab. Also check that the social provider (e.g., Google) is properly configured in Auth0.

Security Best Practices

  • Enable Attack Protection: Configure Auth0’s brute force protection, breached password detection, and bot detection
  • Require MFA: Use Auth0’s MFA capabilities for additional security
  • Customize Universal Login: Brand your login page while ensuring security best practices
  • Monitor Logs: Use Auth0’s logging and monitoring features to track authentication events
  • Rotate Signing Keys: Auth0 allows certificate rotation; coordinate with StatusDrift when rotating
  • Use Anomaly Detection: Enable Auth0’s anomaly detection to identify suspicious login activity

Related Articles

Was this article helpful?