Solution skill
Clerk event: organizationMembership.deleted, revoke entitlements for that org and user
Complete solution
Shows how to fix clerk event: organizationMembership.deleted, revoke entitlements for that org and user. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Fires when a membership ends: the user left, or an admin removed them. Mark it ended or delete it, per your audit needs.
Steps
- Fires when a membership ends: the user left, or an admin removed them. The user still exists in Clerk; only the org link is gone.
- Find your membership row by org id plus user id from the nested payload. Mark it ended or delete it, per your audit needs.
- Revoke org-scoped entitlements: org roles, org API keys you issued, org data access. Do this in the handler, not in a nightly job.
- Decrement seat counts and billing meters if you track them. This event is the decrement to created's increment.
- Keep the user's global account untouched. Do not confuse this with
user.deleted; deleting the user row here would nuke their other orgs. - Return 200.
- Two confusions. First, treating it as a user deletion and wiping the user. Second, treating "removed from org" as "remove from everything": if the user belongs to three orgs, only one membership ended. Scope every write to the org id in the payload.
- - If the removed member was the last admin, your app should have a policy: block the removal, or promote someone, or archive the org. Decide before it happens.
- Orphaned personal data inside the org (their documents, their comments) needs a policy too: reassign, anonymize, or keep. Encode it in this handler.
- Like membership.updated, this event is easy to forget in the subscription list. Audit it.
When to use
You are seeing this: The user still exists in Clerk; only the org link is gone. Use this skill when you run into "Clerk event: organizationMembership.deleted, revoke entitlements for that org and user".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Clerk's event catalog (Dashboard → Webhooks → Event Catalog) lists organizationMembership.deleted. The syncing guide documents webhook-driven state sync. Verified live at https://clerk.com/docs/guides/development/webhooks/syncing.
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_jQpFM9wHVmPTCH4LNmOjyQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Clerk event: organizationMembership.deleted, revoke entitlements for that org and user <span>— Vectle</span></a>