# Enterprise SSO for MENA SaaS: provisioning and offboarding

A customer asks whether your SaaS supports enterprise single sign-on. The demonstration usually ends when an employee reaches the dashboard. For a production rollout, keep the demonstration running: remove that employee's access in the customer's directory, then try the dashboard again from an already open session.

This guide proposes an enterprise onboarding contract for SaaS teams serving Saudi and UAE organisations. It uses SAML for federated sign-in and SCIM for directory provisioning, while keeping application membership and session enforcement explicit. It is a design and acceptance checklist, not a tested implementation or a promise about every identity vendor.

*Cover: original SultanByte artwork showing separate sign-in, provisioning and application-access controls.*

## Separate sign-in from the membership lifecycle

Treat the integration as several connected systems, with named owners. The identity provider authenticates a person. The provisioning connection maintains directory-managed resources. Your application decides whether its local principal can enter a particular workspace and perform the requested action.

The [SCIM core schema, RFC 7643](https://www.rfc-editor.org/rfc/rfc7643.html#section-4.1.1), defines an `active` attribute for a user's administrative status. The service provider defines its precise meaning; the specification gives suspension of login as a typical consequence of `false`. That is not a complete contract for your application's existing sessions, personal API credentials or queued exports.

For the proposed product, define a directory-managed membership state separately from the person's global account. A consultant may legitimately belong to two customer workspaces. Removing their Saudi customer assignment should not automatically erase their unrelated UAE membership. Those are hypothetical customer arrangements, not national rules.

Keep an ownership record for each connection: customer workspace, identity provider, provisioning credential, allowed attributes and approved role mappings. Do not let a posted email domain select the tenant. SultanByte's [tenant-isolation review](https://www.sultanbyte.com/tenant-isolation-for-mena-saas-a-production-review) covers the data-routing boundary after this membership decision.

## Bind federation to the intended customer

For this design, start SAML sign-in from a known customer workspace and keep that context in a server-controlled login transaction. A returned assertion must match the trusted configuration for that connection, not a provider chosen from untrusted response fields.

[OWASP's SAML guidance](https://cheatsheetseries.owasp.org/cheatsheets/SAML_Security_Cheat_Sheet.html) describes signature and schema validation, audience and recipient checks, time restrictions and request correlation. Use a maintained SAML implementation and configure these checks explicitly. A valid signature alone does not establish that the assertion was intended for this service or this login attempt.

Prefer service-provider-initiated login for the initial release. If customers require identity-provider-initiated login, review it as a separate flow with its own replay protection and tenant-binding tests. Do not pretend an unsolicited response has the request correlation of a login your application initiated.

Record the agreed subject identifier and its stability with the customer. Bind it within the validated identity-provider connection. A display name is presentation data; an email address is not a universal account-linking key. Changing a corporate address must not silently create a second privileged account or merge two people's histories.

Keep emergency administration separate from routine customer login. Give any recovery route a documented owner, strong authentication, narrow authority and an audit trail. Test the route before enforcing enterprise-only sign-in, but do not leave ordinary password login as an unnoticed bypass for directory-managed members.

## Decide who may create and change membership

Choose whether first sign-in may create membership, or whether provisioning must create an eligible membership first. For this proposed rollout, use provisioning-first admission for directory-managed employees. A successful SAML response for an unknown or inactive member reaches an access explanation, not an automatic grant.

This avoids a particular race: SCIM disables the member, then a later login recreates membership through just-in-time provisioning. If the product supports both mechanisms, write down their precedence and make a disabled membership block automatic recreation. Re-enablement needs an authorised provisioning transition, not simply another successful authentication.

SCIM identifiers have different owners. [RFC 7643's common attributes](https://www.rfc-editor.org/rfc/rfc7643.html#section-3.1) distinguish the service-provider-issued `id` from the provisioning client's `externalId`; the latter is scoped to the provisioning domain. Keep that distinction in your database. Do not turn an unscoped external identifier into a global principal lookup.

Define group-to-role mappings per customer connection. An external group named "Administrators" should receive no special meaning merely because of its label. Require an approved mapping to an application role, and decide how that role combines with any manually assigned permission.

For directory-owned attributes and roles, make local administration read-only or provide an explicit exception process. Otherwise a directory update and a local edit can repeatedly undo each other. Keep external guests and application-managed invitations under a separate policy; the [workspace invitation guide](https://www.sultanbyte.com/secure-workspace-invitations-for-mena-saas) addresses that admission path.

![Proposed enterprise offboarding sequence: receive a tenant-bound disable, suspend the managed membership, deny existing access, then verify the outcome. Directory delivery delay and application enforcement delay are separate.](https://cdn.hashnode.com/uploads/covers/60ecf4a0fc37a15ec15655e8/d4461b72-cd90-4851-9581-b83533727f5e.png)

*Original infographic: SultanByte. Proposed engineering framework informed by IETF SCIM specifications, Microsoft Entra provisioning documentation and OWASP guidance, November 2026. It states no measured revocation time.*

## Implement the provisioning protocol, not a lookalike endpoint

[RFC 7644](https://www.rfc-editor.org/rfc/rfc7644.html#section-3.5.2) defines SCIM's update operations and error behaviour. Its PATCH format differs from JSON Patch, and a SCIM PATCH request must be handled atomically. Advertising a SCIM endpoint while interpreting only one convenient sample payload leaves the integration dependent on the client's current formatting.

Build a compatibility suite from the operations the chosen connector actually sends. Include lookup filters, creation, supported updates, group membership changes, disablement and deletion. Publish the supported capabilities and reject unsupported operations with the specified response rather than returning success after ignoring them.

Authenticate provisioning requests and bind each credential to one approved customer scope. Resolve target resources inside that scope before changing them. A credential for one customer must not disable another customer's user by guessing a resource identifier.

Keep disablement and deletion distinct. [RFC 7644's deletion rules](https://www.rfc-editor.org/rfc/rfc7644.html#section-3.6) allow the service provider to retain a deleted resource internally, but require the protocol to treat it as absent in specified subsequent operations. This is not a legal retention policy. Decide separately what happens to business records, audit references and recoverable account data; obtain the customer's applicable legal and contractual review. This is practical engineering information, not legal advice.

## Measure directory delivery separately from access enforcement

[Microsoft documents Entra provisioning](https://learn.microsoft.com/en-us/entra/identity/app-provisioning/how-provisioning-works) as initial and incremental synchronisation. Its behaviour depends on scope, mappings and the target application. The documentation describes disablement through `active=false` for SCIM applications, retries after failures and quarantine when calls consistently fail. These are vendor-documented behaviours, not a measured delivery guarantee for your connector.

Keep two intervals in the acceptance record. The first runs from the customer's directory change to your application's accepted provisioning update. The second runs from that accepted update to denial at the protected application boundary. A fast local disable handler cannot compensate for a change that never arrives.

Alert on failed or quarantined provisioning and make the connection's last successful activity visible to the responsible administrator. Agree an emergency application-side suspension procedure for urgent removals. Do not describe a periodic sync connection as instant offboarding.

When disabling membership, persist the new state and its audit receipt together where the storage model permits. The receipt should identify the connection, workspace, target resource and outcome without storing a bearer credential or a complete SAML assertion. Report protocol success only after the required local state is durable.

## Stop existing access, not just the next login

[OWASP recommends checking permissions on every request](https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html). In this design, each protected workspace request must satisfy current membership as well as session authentication. A session established before disablement must not preserve the old membership indefinitely.

If permission decisions are cached, document and test their maximum stale interval. If services accept self-contained tokens without a current membership check, explain how revocation reaches them or how long the old authority can survive. The customer-facing promise must match that deployed boundary.

[OWASP's session guidance](https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html) requires server-side invalidation when a session ends. Clearing a browser cookie alone does not terminate a copied session credential. For a multi-workspace user, choose whether to invalidate the whole login or preserve it while denying the suspended workspace; test the choice across open tabs.

Inventory access that survives beyond ordinary page requests. Personal API credentials, long-lived connections, pending jobs and released download links need explicit treatment. A disabled member should not be able to retrieve a newly completed private export merely because the job began earlier. Already delivered data cannot be recalled by changing membership, and independently authorised service jobs need a different policy from user-owned work.

## Make offboarding part of customer acceptance

Use synthetic users and two workspaces. Capture resulting server state and protected-request outcomes, not just the directory's green status indicator. The following are proposed release tests:

- Disable a user while two authenticated tabs remain open. Check ordinary reads, writes and a direct API call using the existing credential.
- Remove one workspace assignment from a person who belongs to two. Verify the intended suspension without damaging the other membership.
- Change a user's email and Arabic display name. Require the same principal and history, with no new grant from the display change.
- Remove a role-bearing group while the person remains active. Check that the lost privilege disappears under the declared mapping policy.
- Interrupt provisioning delivery, then restore it. Check alerting, retry outcomes and the emergency suspension path.
- Attempt sign-in after disablement. Require that just-in-time creation cannot reactivate the member.

Also test the Arabic and English access-denied screens. Name the selected workspace clearly and provide a useful administrator contact without exposing another customer's membership details. Language changes must not change the selected connection or revive access.

For buyers, ask for the recorded outcome of the open-session disablement test and the documented maximum enforcement delay. For engineering teams, keep that same test in the connector release suite. Approve the integration only when both parties can explain who owns membership, how changes arrive and what existing access remains after removal.

