SE DocsSE Docs

SAML Single Sign-On (SSO)

Configure SAML-based single sign-on for your team to centralise authentication through your identity provider.

Overview

Shocking Energy supports SAML 2.0 Single Sign-On (SSO) for teams on the Enterprise plan. SSO lets your team members authenticate through your organisation's identity provider (IdP) instead of managing separate credentials.

Benefits of SSO for enterprise teams:

  • Centralised access control -- manage who can access Shocking Energy from your IdP
  • Reduced credential fatigue -- team members sign in with existing corporate credentials
  • Improved security posture -- enforce your organisation's authentication policies (MFA, conditional access, device trust)
  • Automated provisioning -- new team members are created automatically on first sign-in (JIT provisioning)
  • Simplified offboarding -- remove a user in your IdP, and SCIM or a session lifetime ends their access in Shocking Energy (see Offboarding)

Supported identity providers

Shocking Energy works with any SAML 2.0 compliant identity provider. The following providers have been tested and have dedicated setup guides:

ProviderStatus
Microsoft Entra ID (Azure AD)Fully supported
OktaFully supported
Google WorkspaceFully supported
OneLoginFully supported
Ping IdentityFully supported
JumpCloudFully supported
ADFSFully supported
Generic SAML 2.0Supported via manual configuration

Prerequisites

Before configuring SSO, ensure you have:

  • An Enterprise plan subscription for your team
  • Owner or Administrator role on the Shocking Energy team
  • Administrative access to your identity provider
  • A verified email domain that your team members use (e.g. yourcompany.com)

SSO configuration requires an Enterprise plan. Contact sales at sales@shocking.energy to upgrade your team.


Identity provider setup

Microsoft Entra ID (Azure AD)

Create an Enterprise Application

  1. Sign in to the Azure Portal and navigate to Microsoft Entra ID > Enterprise applications
  2. Click New application > Create your own application
  3. Enter Shocking Energy as the application name
  4. Select Integrate any other application you don't find in the gallery (Non-gallery)
  5. Click Create

Configure SAML settings

  1. In the new application, go to Single sign-on > SAML
  2. Under Basic SAML Configuration, click Edit and set:
    • Identifier (Entity ID): Copy this from the Shocking Energy SSO settings page
    • Reply URL (Assertion Consumer Service URL): Copy this from the Shocking Energy SSO settings page
  3. Click Save

Configure attributes and claims

  1. Under Attributes & Claims, click Edit
  2. Ensure the following claims are mapped:
ClaimValue
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddressuser.mail
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givennameuser.givenname
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surnameuser.surname
  1. Optionally, add a group claim if you intend to use role mapping (see Role mapping below)

Download the metadata

  1. Under SAML Certificates, download the Federation Metadata XML file
  2. Alternatively, copy the following values individually:
    • Login URL (from the SAML setup section)
    • Azure AD Identifier (Entity ID)
    • Certificate (Base64) (download from SAML Certificates)

Assign users

  1. Go to Users and groups > Add user/group
  2. Assign the users or groups that should have access to Shocking Energy
  3. Only assigned users will be able to sign in via SSO

Users must be assigned to the Enterprise Application in Entra ID before they can sign in. Unassigned users will receive an error from Microsoft during authentication.

Okta

  1. In the Okta Admin Console, go to Applications > Create App Integration
  2. Select SAML 2.0 and click Next
  3. Set the app name to Shocking Energy
  4. Configure the SAML settings:
    • Single sign-on URL: Copy the ACS URL from the Shocking Energy SSO settings page
    • Audience URI (SP Entity ID): Copy the Entity ID from the Shocking Energy SSO settings page
    • Name ID format: EmailAddress
  5. Add attribute statements for email, firstName, and lastName
  6. Complete the wizard and assign users or groups to the application
  7. From the Sign On tab, copy the Metadata URL or download the metadata XML

Google Workspace

  1. In the Google Admin Console, go to Apps > Web and mobile apps > Add app > Add custom SAML app
  2. Name the app Shocking Energy and click Continue
  3. On the Google Identity Provider details page, download the IdP metadata file or copy the SSO URL and certificate
  4. Set the service provider details:
    • ACS URL: Copy from the Shocking Energy SSO settings page
    • Entity ID: Copy from the Shocking Energy SSO settings page
    • Name ID format: EMAIL
    • Name ID: Basic Information > Primary email
  5. Add attribute mappings for firstName and lastName
  6. Click Finish and turn the app ON for the relevant organisational units

Generic SAML 2.0

For any SAML 2.0 compliant identity provider:

  1. Create a new SAML application in your IdP
  2. Configure the following service provider settings (copy from the Shocking Energy SSO settings page):
    • Entity ID (SP Entity ID)
    • Assertion Consumer Service (ACS) URL
  3. Ensure the SAML response includes these attributes:
    • email (required) -- the user's email address
    • firstName (optional) -- used for JIT provisioning
    • lastName (optional) -- used for JIT provisioning
  4. Set the Name ID format to urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
  5. Export the IdP metadata XML or note down:
    • IdP SSO URL (the login endpoint)
    • IdP Entity ID
    • X.509 signing certificate

Shocking Energy configuration

Once your identity provider is configured, complete the setup in Shocking Energy.

Navigate to SSO settings

Go to Settings > Single Sign-On in the Shocking Energy dashboard. This page is only visible to team owners and administrators on the Enterprise plan.

Select your identity provider

Choose your identity provider from the dropdown list. If your provider is not listed, select Generic SAML.

Enter IdP metadata

You can configure the connection in one of two ways:

  • Metadata URL: Paste the metadata URL from your IdP. Shocking Energy will automatically fetch and parse the configuration. This is the recommended approach as it keeps settings synchronised.
  • Manual configuration: Upload the metadata XML file, or enter the IdP SSO URL, IdP Entity ID, and X.509 certificate individually.

Add and verify domains

Add the email domains that should be routed through SSO (e.g. yourcompany.com). Type each domain and press Enter to add it. When a user with a matching email domain signs in, they will be redirected to your identity provider.

Each domain must be verified via a DNS TXT record before SSO can be activated:

  1. Click Verify next to the domain to generate a verification token
  2. Add a TXT record to your domain's DNS configuration:
    • Host / Name: _se-verify.yourcompany.com
    • Value: The token shown on screen (e.g. se-verify=a1b2c3d4-...)
  3. Click Check DNS to verify. DNS propagation can take up to 48 hours, but typically completes within minutes.

Domain verification proves ownership and prevents other teams from claiming your domain. The TXT record can be removed after verification is confirmed.

Test the connection

Click Test Connection to perform a test sign-in. This opens a new window where you authenticate with your identity provider. The test verifies that:

  • The SAML handshake completes successfully
  • Required attributes (email, name) are received
  • The email domain matches a verified domain

If the test fails, check the error details displayed on screen and refer to the Troubleshooting section.

Activate SSO

Once the test passes, click Activate to enable SSO for your team. Team members with matching email domains will be redirected to your identity provider on their next sign-in.


Role mapping

Role mapping lets you automatically assign Shocking Energy roles based on group membership in your identity provider.

Configuring role mappings

  1. Navigate to Settings > Single Sign-On > Role Mapping
  2. Use the visual editor to create mappings between IdP groups and Shocking Energy roles
  3. For each mapping, specify:
    • IdP group name or ID -- the group attribute value sent in the SAML assertion
    • Shocking Energy role -- the role to assign (Owner, Member, or Engineer)

Default role

Set a default role that applies when a user signs in via SSO but does not match any role mapping. This ensures new users always receive an appropriate permission level.

If no default role is set and a user does not match any mapping, they will not be able to access the team. It is recommended to always configure a default role.

Group-based mapping

To use group-based role mapping, your identity provider must include group information in the SAML assertion. Refer to your IdP's documentation for configuring group claims:

  • Entra ID: Add a group claim in Attributes & Claims
  • Okta: Configure a group attribute statement in the SAML app settings
  • Google Workspace: Use custom attributes or map organisational units

Role mappings are evaluated on every sign-in, so changes to group membership in your IdP are reflected the next time the user authenticates.


SSO enforcement

By default, SSO is available as an alternative sign-in method alongside email and password. You can enforce SSO-only login to require all team members to authenticate through your identity provider.

When SSO enforcement is enabled:

  • Members whose email domain is one of your SSO domains must sign in via SSO. The sign-in page offers them only SSO.
  • Members on any other email domain have no SSO sign-in, so they cannot access the team while enforcement is on. They can still sign in with a password or magic link to reach their other teams.
  • Signing in with a password or magic link never gives access to this team. Anyone who does is stopped at an SSO required page.
  • Enforcement applies to the next request, so sign-in sessions that are already open are blocked as soon as you turn it on.
  • API keys are not SSO-checked, and turning on enforcement does not revoke them. An OAuth app stops working for this team when the person who approved it has no SSO sign-in. Review API keys and OAuth apps in Settings > Developer.

Shocking Energy support agents (platform staff added to your team as support agents) are the one exception. They can use the web dashboard and the mobile app with their staff sign-in, and your team's MFA requirement still applies to them. The AI assistant, approving an OAuth app, and calling the REST API or MCP with their sign-in still require SSO. Because the dashboard is open to them, a support agent with an Owner seat can create API keys in Settings > Developer. Like every API key, those keys are not SSO-checked.

To enable enforcement, go to Settings > Single Sign-On and toggle Require SSO for all members.

Before enforcing SSO, ensure all team members can authenticate through your identity provider. Users who are not assigned in your IdP will be locked out of the team.

Disabling vs deleting SSO

  • Disable: Sets the SSO configuration to inactive. SSO enforcement is automatically removed to prevent lockouts. Team members fall back to email/password or magic link sign-in. The IdP configuration is preserved and can be re-activated later.
  • Delete: Permanently removes the SSO configuration, including all domain verifications and the SAML provider registration. This cannot be undone — you will need to reconfigure SSO from scratch.

Login flow

When SSO is configured for your team, the sign-in experience changes to a two-step flow:

  1. Email entry -- the user enters their work email address and clicks Continue
  2. Method selection -- Shocking Energy checks whether the email domain has SSO configured:
    • If SSO is enforced for the domain, the user is redirected to the identity provider immediately
    • If SSO is available (but not enforced), the user sees a Continue with SSO button alongside the standard password option
    • If no SSO is configured for the domain, the standard password field is shown

Personal email domains (Gmail, Outlook, Yahoo, etc.) are never routed to SSO, even if SSO is available for the team.


Just-in-time provisioning

Just-in-time (JIT) provisioning automatically creates Shocking Energy user accounts when someone signs in via SSO for the first time. This eliminates the need to manually invite each team member.

When JIT provisioning is enabled:

  • A new user account is created from the email attribute in the SAML assertion. The user's name is taken from the identity provider's given-name and surname claims -- givenname / surname on Entra ID, firstName / lastName elsewhere -- falling back to the display name claim if neither is sent
  • The user is added to the team with the default role (or a mapped role if role mapping is configured)
  • No invitation email is sent -- the user is immediately active

JIT provisioning is disabled by default. Turn it on under Settings > Single Sign-On > Provisioning > Enable automatic provisioning. While it is off, SSO sign-in still works, but no team membership is created -- users must be invited before they can access the team.

Name claims are only read if they are part of the attribute mapping registered with your SAML provider. Connections configured before name mapping was added still carry the older mapping, which requested the email, display name and group claims only. Press Re-sync attribute mapping under Settings > Single Sign-On > Configuration to push the current mapping to your provider. Nothing in your identity provider changes, and updated claims apply at each user's next sign-in -- until then, users on that connection may show without a name, or with their email address in place of one.


Offboarding

Choose how a removal in your identity provider ends access in Shocking Energy. Both controls are under Settings > Single Sign-On > Provisioning > Offboarding, and you can turn on both.

MethodSetupAccess ends within
SCIM provisioningOnce, in your identity providerOne provisioning cycle (approximately 40 minutes on Entra ID, up to 24 hours on Google Workspace), plus up to 1 hour
Session lifetimeOne setting in Shocking EnergyThe lifetime that you choose, plus up to 1 hour
NeitherNoneNo limit. A person who is signed in keeps access until you remove them from the team

The extra hour is the life of an access token that Shocking Energy already issued.

What counts as removal

  • In Microsoft Entra ID, a disable, a delete or an unassignment from the enterprise application ends access.
  • In Google Workspace, a suspension, a delete, or turning off the SAML app for the user ends access. The deprovisioning settings of the app set how long Google waits.
  • In on-premises Active Directory, a disable or a delete ends access after the sync sends it to Entra ID.
  • A removal from a group only changes the role, through role mapping.

Set up SCIM with Microsoft Entra ID

Generate a token

  1. In Shocking Energy, go to Settings > Single Sign-On > Provisioning
  2. Under Offboarding, copy the Tenant URL and click Generate token
  3. Copy the token. Shocking Energy shows it only once

Connect the enterprise application

  1. In the Microsoft Entra admin center, open the enterprise application that you use for Shocking Energy SSO
  2. Go to Provisioning > New configuration
  3. Paste the Tenant URL, and paste the token into Secret Token
  4. Click Test Connection, then Create

Check the scope and the mappings

  1. Keep the scope Sync only assigned users and groups
  2. Under Properties, set Assignment required? to Yes
  3. Under Attribute mapping for users, keep userName mapped from userPrincipalName and emails[type eq "work"].value mapped from mail. The mail value must match the email claim of your SAML application
  4. Keep active mapped from Switch([IsSoftDeleted], ...), and keep the Update target action on
  5. Turn off the mapping for groups. Shocking Energy takes roles from the SAML group claim

Start provisioning

  1. Set a Notification Email, and turn on the prevention of accidental deletions
  2. Use Provision on demand to test one user
  3. Click Start provisioning

Set up SCIM with on-premises Active Directory

Active Directory Domain Services has no SCIM client. Shocking Energy gets the removals from Active Directory through Microsoft Entra ID.

If you sync Active Directory to Entra ID with Microsoft Entra Connect Sync or Microsoft Entra Cloud Sync:

  1. Set up SSO and SCIM in Entra ID, as in Set up SCIM with Microsoft Entra ID
  2. Give each user the mail attribute in Active Directory. Entra ID sends this value as the work email, and it must match the email claim of your SAML application
  3. To remove a person, disable or delete the account in Active Directory

Entra ID gets the change at the next sync. By default, Entra Connect Sync runs every 30 minutes, and Entra Cloud Sync runs approximately every 2 minutes. The next provisioning cycle then sends the change to Shocking Energy.

With Entra Connect Sync, you can send a removal to Entra ID at once. Run Start-ADSyncSyncCycle -PolicyType Delta on the sync server. Provision on demand does not send a disable for an account that is disabled in Entra ID.

If you sign in through AD FS with no Entra ID, use a session lifetime. AD FS has no SCIM client. A disabled account cannot sign in through AD FS again, so its access ends when its session lifetime ends.

Set up SCIM with Google Workspace

Google Workspace sends SCIM to a custom SAML app only through its beta of custom SCIM profiles. If the page of your SAML app in the Google Admin console has no Autoprovisioning section, your organisation does not have the beta yet. Use a session lifetime instead.

Generate a token

  1. In Shocking Energy, go to Settings > Single Sign-On > Provisioning
  2. Under Offboarding, copy the Tenant URL and click Generate token
  3. Copy the token. Shocking Energy shows it only once

Connect the SAML app

  1. Sign in to the Google Admin console as a super administrator
  2. Go to Apps > Web and mobile apps, and open the SAML app that you use for Shocking Energy SSO
  3. Under Autoprovisioning, click Configure auto-provisioning
  4. Paste the token into Access token, then click Continue
  5. Paste the Tenant URL into Endpoint URL, then click Continue

Map the attributes and the scope

  1. Map userName to the primary email. This must be the same email that your SAML app sends as the Name ID
  2. Map name.givenName to the first name and name.familyName to the last name, then click Continue
  3. Optionally, add groups to send only their members. With no group, Google sends each person who can use the SAML app. Shocking Energy takes roles from the SAML group attribute, not from these groups

Set the deprovisioning

  1. Select Suspend with the delay Within 24 hours for each of these events:
    • When an app is turned off for a user
    • When a user is suspended from Google
    • When a user is deleted from Google
  2. If you also select Hard delete, give it a longer delay than Suspend. A hard delete also removes the person from your Shocking Energy team
  3. Click Continue

Test and turn on provisioning

  1. Under Google Directory user, select a person who has no Shocking Energy account, then click Test. Google creates, updates and deletes that person in Shocking Energy
  2. Click Finish
  3. On the page of the app, set Autoprovisioning to Active. Google starts provisioning only after this step

Never test with a current member of your team. The delete in the test bans that account and removes it from the team.

Google can wait up to 24 hours before it suspends a person. To end access sooner, also set a session lifetime of 8 or 12 hours.

Other identity providers

Other identity providers that support SCIM 2.0 use the same Tenant URL and token. Map userName or the work email to the email that your SAML app sends.

Rotate the SCIM token

The token expires after 1 year. The Offboarding card warns you 30 days and 7 days before that date. When you rotate the token, the old token works for 24 more hours.

  • In Microsoft Entra ID, paste the new token into Secret Token, then select Restart provisioning.
  • In Google Workspace, go to Autoprovisioning > App authorization, click Reauthorize and paste the new token.

Set a session lifetime

Under Session lifetime, choose 8 hours, 12 hours, 24 hours, 7 days or 30 days. After this time, each person signs in again through your identity provider. A shorter value also applies to people who are signed in now. When you choose another value, each open session ends at now plus the new lifetime. A change to Unlimited, or a disabled SSO configuration, removes the end of each open session. Both changes also replace an earlier end that your identity provider set. Unlimited is the default.

When you turn on SCIM, Shocking Energy proposes a lifetime of 7 days as a backstop. Entra ID can pause a provisioning job that fails, and the lifetime still ends access then.

Limits

  • Team API keys belong to the team, not to a person. Revoke them under Settings > Developer.
  • A phone that is offline keeps its data until it connects again. Then the app signs the person out.
  • SCIM does not manage a person that your identity provider does not send to Shocking Energy. Examples are a member of a nested group in Entra ID, and a person from a secondary domain in Google Workspace. Such a person keeps access until you remove them. The Offboarding card counts these people.

Account Migration

When SSO is enabled, existing team members who previously signed in with email and password will receive a new account when they first sign in via SSO. Their previous data (jobs, notes, settings) remains tied to their old account. Shocking Energy provides two ways to merge these accounts.

Admin Migration Tool

Team owners can proactively manage account migration from Settings > Single Sign-On > Migration tab.

View affected users

The Migration tab shows a list of team members whose email domain matches your SSO configuration and who still have legacy (email/password) accounts.

Trigger bulk migration

Click "Migrate All" to create migration records for all affected users. For users who have already signed in via SSO, the data transfer happens immediately. For users who haven't yet, the migration will execute automatically when they first sign in via SSO.

Monitor progress

The migration table shows the status of each account: Pending SSO Sign-in, Completed, or Failed. Failed migrations can be retried.

Self-Service Account Linking

When a user signs in via SSO and a matching legacy account is detected, they are automatically redirected to the Account Linking page.

Review the prompt

The user sees a message explaining that their previous account data needs to be merged into their new SSO account.

Verify ownership

If the legacy account had a password, the user must enter it to confirm ownership. For magic-link-only accounts, SSO already proves email ownership, so this step is skipped.

Complete the merge

Data is transferred automatically: team memberships, job assignments, notes, tokens, and profile settings. The user is redirected to the dashboard.

Users can skip the linking prompt and merge later. They will be prompted again after 7 days. During this time, their old data remains accessible only under the legacy account.

What Gets Migrated

The migration transfers the following data from the old account to the new SSO account (scoped to the current team):

  • Team membership and role (Owner/Member/Engineer)
  • Job assignments (assigned_to)
  • Job notes (authorship)
  • API tokens (created_by)
  • Invoice records (created_by)
  • Profile data (name, avatar, locale, timezone)

Data in other teams is not affected. If the user is a member of multiple teams, each team's migration is handled independently.


Troubleshooting


Frequently asked questions

On this page