{
  "id": 20921285,
  "title": "SCIM Provisioning & Deprovisioning That Actually Removes Access",
  "url": "https://urgent.news/2026/11/20/scim-provisioning-deprovisioning-that-actually-removes-access",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-20T16:29:07.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/muhammadalimughal/scim-provisioning-deprovisioning-that-actually-removes-access-jjo"
  },
  "original_language": "en",
  "account": "When a user leaves a company, their identity provider (IdP) sends a deprovisioning request to your application. This request includes the user's unique identifier, such as a username or email address. Your application must respond to this request by blocking login, revoking any live sessions, disabling API tokens and pending invites, and logging the change—all within a single, transaction-safe step.\n\nTo accomplish this, your application must first authenticate the IdP per tenant. Each customer tenant is assigned a unique long random bearer token for SCIM, stored hashed and rotatable. A middleware function checks the bearer token in the request and ensures it corresponds to the correct tenant's users. If the token is invalid or not associated with a tenant, the application returns a 401 Unauthorized response.\n\nNext, the application handles the PATCH /Users/{id} endpoint with active: false. This endpoint is sent by the IdP when deprovisioning a user. The application must normalize the different ways IdPs express deactivation, such as replace active with false or active: false. Once normalized, the application uses a transaction to update the user's status, kill all live sessions (database or Redis), and disable any API tokens and pending invites. Finally, the application logs the change to maintain a record of the deprovisioning event.",
  "summary": "Here is a scenario I now test on every enterprise SSO integration. An employee leaves a customer company. Their IT team disables the account in the identity provider. The next morning, the ex-employee's laptop is still logged in to your SaaS app, because the session cookie is valid for 30 days and nobody told your app anything. Their personal API token, created months ago for a script, still…",
  "key_points": [
    "IdP sends deprovisioning request with user's unique identifier",
    "Application blocks login, revokes live sessions, disables tokens",
    "Transaction-safe step ensures single-step deprovisioning"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}