Enterprise customers expect two things from a B2B SaaS product in 2026: a seamless single sign-on (SSO) experience and reliable account provisioning/deprovisioning. Together, SSO (via SAML or OIDC) plus SCIM 2.0 provisioning form the standard integration surface for enterprise identity. This guide walks product, engineering, and security teams through a practical, testable implementation plan—covering protocol choices, attribute mapping, security best practices, testing with major identity providers (IdPs), monitoring, and a rollout checklist.
Why SSO + SCIM matters now
Large customers use centralized identity platforms (Okta, Microsoft Entra ID, OneLogin, Google Workspace, JumpCloud) to control access. Without SSO you lose enterprise deals or create operational friction. Without SCIM, provisioning becomes manual—error-prone and risky for offboarding (data access after an employee leaves).
- SSO improves security and reduces help‑desk load from password resets.
- SCIM automates user lifecycle events: create, update, deactivate, and group sync.
- Together they reduce churn and shorten procurement timelines.
High-level design decisions
Before coding, answer these questions with stakeholders (product, sales, legal):
- Which SSO protocols to support? SAML 2.0 is still required for many enterprise customers; OIDC (OpenID Connect) is increasingly requested for modern identity stacks.
- Will you offer Just-In-Time (JIT) provisioning, SCIM provisioning, or both? JIT (provision on first login) is easy for auth-only needs; SCIM is required when customers need central provisioning that can be controlled by identity teams.
- How will tenant isolation work? Each customer must have isolated configuration (metadata, certificates, tokens, attribute mappings).
- What SLAs and audit requirements do customers expect? Enterprises want traceable admin actions and logs for provisioning events.
Protocol primer (SAML vs OIDC)
Both are valid; choose to support both eventually.
- SAML 2.0: XML assertions, signed, commonly used with enterprise IdPs. Key fields: entityID (Issuer), AssertionConsumerService (ACS) URL, NameID format, x.509 signing certificate, Audience, Assertion Conditions.
- OIDC: JSON-based, supports dynamic client registration and modern flows. Key parts: discovery document (.well-known/openid-configuration), client_id/client_secret or client credentials, authorization and token endpoints, userinfo endpoint. Useful for mobile/native apps and modern identity stacks.
SCIM 2.0 basics
SCIM 2.0 is defined by RFC 7643 and RFC 7644. SCIM exposes REST endpoints (commonly /Users and /Groups) and standard attributes (userName, emails, name.familyName, active, externalId). The IdP calls your SCIM API to create, update, or deactivate users.
- Support the core SCIM operations: POST /Users, GET /Users/{id}, PUT/PATCH /Users/{id}, DELETE /Users/{id} (or set active=false when soft-deleting).
- Implement Groups support early—many customers provision by group membership.
- Consider optional SCIM Bulk if customers expect large batch operations; many IdPs do not use bulk by default.
Authentication and authorization for SCIM
Common patterns:
- OAuth 2.0 Client Credentials: preferred—IdP obtains a token and calls SCIM with bearer tokens scoped to provisioning-only actions.
- Per-tenant provisioning tokens: issue a unique token per customer so one compromised token does not affect others.
- Mutual TLS: some customers demand mTLS for SCIM endpoints—support as an enterprise-grade option.
- Rotate tokens and certificates regularly; provide metadata for rotation to customers.
Attribute mapping and identity model
Define a canonical mapping between SCIM attributes and your user model:
- Minimum fields: userName (unique username or email), externalId (IdP-managed ID), emails[type=work].value, name.givenName, name.familyName, active (true/false).
- Groups: map SCIM Groups to roles or team memberships inside your app.
- Custom attributes: allow customers to map custom SCIM attributes to metadata fields, but validate types and length.
Provide a mapping UI in the admin console with safe defaults and an option to preview mappings before enabling provisioning.
Onboarding flow & UX
- Provision tenant: create a per-customer config record (SAML metadata or OIDC client, SCIM endpoint and token).
- Provide metadata export: a downloadable SAML metadata XML or an OIDC client configuration guide for Entra/Okta.
- Offer a "Test connection" button that runs a minimal SCIM create/update/delete cycle and a SAML/OIDC login test.
- Show clear error messages and diagnostics for admins (e.g., last SCIM response status, last SAML assertion time).
Security best practices
- Validate all incoming SAML assertions and OIDC ID tokens: check signatures, issuer, audience, and expiry.
- For SAML, require signed assertions and either signed responses or signed assertions depending on customer risk profile. Validate NameID format and prevent assertion replay.
- Require TLS for all endpoints. For SCIM, prefer OAuth 2.0 bearer tokens with strict scopes; support mTLS where requested.
- Rate-limit provisioning endpoints per-customer. Implement exponential backoff and queueing for high-volume operations.
- Log provisioning events with correlation IDs, but mask PII in logs and ensure retention policies meet customer and legal needs.
Testing with real IdPs (Entra, Okta, OneLogin)
Set up pilot customers using the IdPs most requested by your sales pipeline. Tips:
- Microsoft Entra ID (formerly Azure AD): use the Enterprise Applications blade to configure SAML or OIDC; Entra supports provisioning via SCIM with OAuth bearer tokens and expects /Users and /Groups endpoints.
- Okta: uses SAML/OIDC and a SCIM connector pattern. Okta's admin console lets you test provisioning and shows SCIM logs.
- OneLogin and JumpCloud: both support SCIM; they can be stricter about attribute formats and group roles—test edge cases like changing primary email.
- Use sample test tenants and automation to run end-to-end tests: create user in IdP, verify SCIM POST creates user, update attribute, verify PATCH applies, disable in IdP, verify deprovisioning behavior.
Deprovisioning strategies
Deprovisioning is often the hardest requirement for customers. Options:
- Hard delete: DELETE /Users/{id} removes the record. This is disruptive and must be used carefully.
- Soft delete: set active=false and keep data for a configured retention window. This lets you honor legal retention while preventing access.
- Automated archival workflows: trigger data retention jobs when active=false to purge or archive after a retention period agreed with the customer.
Operational concerns and scaling
Plan for operational maturity early:
- Observability: emit metrics for SCIM request rate, SCIM success rate, SSO login success rate, certificate expiration, and time-to-provision.
- Alerting: set alerts for repeated SCIM failures, certificate expiry within 14 days, or elevated SSO error rates.
- Testing & CI: include SAML/OIDC and SCIM integration tests in CI using local test IdPs (e.g., Keycloak) and a small set of sandbox tenants for Okta/Entra.
- Backpressure: queue SCIM operations if downstream processing (e.g., group synchronization) is slow; ensure idempotency so retries are safe.
Common pitfalls
- Assuming email is immutable: customers change primary emails—use externalId where possible as a stable identifier.
- Over-relying on DELETE: automatic hard deletes lead to compliance problems. Prefer soft deletes by default.
- Not rotating credentials: long-lived tokens increase risk. Build token rotation flows and notify admins ahead of expiry.
- Poor error feedback: opaque 500s or 403s cause long support cycles. Return structured, actionable errors for provisioning calls.
Rollout plan (90-day blueprint)
- Days 0–14: Design canonical user model and per-tenant config model. Pick initial SSO and SCIM authentication approaches (SAML + OAuth SCIM token).
- Days 15–30: Implement SAML and/or OIDC login flows, ability to store per-tenant metadata, and a minimal admin UI for uploading metadata or entering IdP details.
- Days 31–50: Implement SCIM endpoints for Users and Groups, per-tenant tokens, token rotation endpoints, and a test harness (Keycloak + Okta sandbox).
- Days 51–70: Add monitoring, logging, rate limiting, and a mapping UI. Run pilot integrations with 2–3 customer IdPs (Entra, Okta, OneLogin).
- Days 71–90: Harden security (mTLS option, stricter validation), produce documentation and developer/IT admin guides, and move to commercial rollout.
Checklist for launch
- Per-tenant SSO config stored and versioned; certificate rotation supported.
- SCIM /Users and /Groups implemented, authenticated via per-tenant OAuth token.
- Attribute mapping UI + preview available to customer admins.
- Integration test suite covering IdP flows and SCIM lifecycle.
- Metrics + alerts for SCIM failures, certificate expiry, and SSO error spikes.
- Admin-facing diagnostics page showing last provisioning attempts and raw responses.
- Docs: configuration guides for Okta, Entra ID, OneLogin, Google Workspace, and JumpCloud.
Resources
- SCIM RFCs: RFC 7643 (SCIM Core Schema) and RFC 7644 (SCIM Protocol).
- Okta and Microsoft Entra developer docs for SCIM connectors and SSO setup.
- Open-source IdPs for testing: Keycloak (great for OIDC/SAML test scenarios) and simple SAML test tools.
SSO and SCIM are table stakes for B2B SaaS in 2026. Implementing them well shortens sales cycles, reduces support overhead, and meets enterprise security expectations. Start with a simple, secure MVP (SAML + SCIM bearer tokens), pilot with two identity providers from your pipeline, and iterate—adding OIDC, mTLS, and bulk features as customer demand dictates. With a clear mapping model, robust logging, and token rotation processes, your product will be ready for enterprise adoption without creating operational headaches.