Skip to content

Configuring Enterprise SSO and SCIM Directory Sync

Enforce SAML 2.0 / OIDC single sign-on and automate user provisioning with Okta or Microsoft Entra ID via SCIM 2.0.

Configuring Enterprise SSO and SCIM Directory Sync

Manual invitation tracking across large engineering and marketing organizations increases access sprawl and onboarding latency. This guide configures SAML 2.0 / OIDC Single Sign-On (SSO) and enables automated SCIM 2.0 user and group synchronization through Okta, Microsoft Entra ID, or Google Workspace.


Prerequisites

  • Workspace permissions: Owner role on a Shaf Enterprise plan.
  • Administrative access to your corporate Identity Provider (Okta, Microsoft Entra ID, Google Cloud Identity).
  • Access to your corporate apex domain’s DNS zone to create a verification TXT record.

Implementation Recipe

  1. Verify Corporate Domain Ownership

    In the Shaf Dashboard, navigate to Settings → Enterprise SSO → Domains and add your corporate email domain (e.g., acme.com).

    Add the generated verification TXT record at your domain’s DNS apex:

    Type Host Value TTL
    TXT @ (apex) shaf-domain-verification=shaf_txt_8f492b0c3d9a71e5 300

    Click Verify Domain or trigger verification via API:

    curl -X POST "https://shaf.app/api/v1/sso/domains/dom_acme_corp/verify" \
      -H "Authorization: Bearer $SHAF_API_TOKEN"
  2. Configure SAML 2.0 / OIDC Single Sign-On

    In your Identity Provider (Okta or Entra ID), create a new SAML 2.0 Enterprise Application:

    SAML Attribute Value
    Single Sign-On (ACS) URL https://dash.shaf.app/api/auth/sso/callback
    Audience URI (Entity ID) https://shaf.app
    Name ID Format EmailAddress (urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress)
    Attribute Statements email → user.email, firstName → user.firstName, lastName → user.lastName

    Upload your IdP metadata XML or paste your SSO Sign-In URL and X.509 certificate into Shaf’s SSO configuration panel.

  3. Enable SCIM 2.0 User Provisioning

    Automate employee onboarding and de-provisioning using SCIM (see SCIM API Reference for endpoint specifications):

    1. In Shaf, click Generate SCIM Credentials to issue a long-lived SCIM token (scim_tok_...).
    2. In your IdP’s Provisioning settings, set the SCIM Base URL:
      https://shaf.app/api/v1/scim/v2
    3. Enter the Bearer token in the SCIM Authorization field.
    4. Enable Create Users, Update User Attributes, and Deactivate Users.
    5. Assign relevant IdP groups to push to Shaf.

Verification

Validate SSO redirection and query the SCIM directory endpoint:

  1. Initiate an SP-initiated corporate login in an incognito browser:

    https://dash.shaf.app/login?domain=acme.com

    Expected behavior: Shaf identifies acme.com, redirects to your corporate IdP login screen, challenges for credentials and MFA, and returns to the Shaf dashboard with an authenticated session.

  2. Query the SCIM directory using cURL:

    curl -X GET "https://shaf.app/api/v1/scim/v2/Users?filter=userName%20eq%20%22alice@acme.com%22" \
      -H "Authorization: Bearer $SCIM_TOKEN"

    Expected response (200 OK):

    {
      "schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
      "totalResults": 1,
      "Resources": [
        {
          "id": "usr_01j8k9x2m4",
          "userName": "alice@acme.com",
          "active": true,
          "emails": [{ "value": "alice@acme.com", "primary": true }]
        }
      ]
    }

Common Gotchas

Issue / Error Root Cause Solution
SAML Response: Clock Skew Error Time drift between IdP server clock and Cloudflare Anycast edge nodes. Synchronize IdP server time via Network Time Protocol (NTP). Max allowed drift is 120 seconds.
401 Unauthorized on SCIM push The SCIM bearer token was expired, rotated, or revoked. Re-generate a SCIM Bearer token in Shaf settings and update your IdP configuration.
NameID Invalid IdP sent an opaque identifier instead of the user’s primary work email. Update SAML Name ID format to emailAddress in your identity provider application settings.
User retains access after IdP removal SCIM de-provisioning was not toggled in your identity provider. Ensure the Deactivate Users capability is enabled in Okta or Entra SCIM settings.

Type to search…

↑↓ navigate↵ selectEsc close