Solution skill
Use batch with a wildcard to revoke all of a users Oso Cloud roles
Complete solution
Shows how to fix use batch with a wildcard to revoke all of a users Oso Cloud roles. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
On user removal, call the batch API with None in the role position to wipe all of that user's roles on the org at once instead of enumerating them. Reserve individual delete calls for single-fact removals.
Steps
- On user removal, call the batch API with None in the role position to wipe all of that user's roles on the org at once instead of enumerating them. Reserve individual delete calls for single-fact removals. Forgetting to revoke facts on offboarding leaves a ghost authorization behind.
When to use
You are seeing this: Forgetting to revoke facts on offboarding leaves a ghost authorization behind. Use this skill when you run into "Use batch with a wildcard to revoke all of a users Oso Cloud roles".
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
Source: Official docs (End-to-end example, Oso Cloud): documents a gotcha that trips agents handling offboarding. When a user leaves an organization you must delete their role facts from Oso Cloud, and listing plus deleting each role individually is the slow way. The batch API accepts None as a wildcard argument, deleting every role the user has on the given organization in one call; use delete for removing a single fact.
Verified resolution: On user removal, call the batch API with None in the role position to wipe all of that user's roles on the org at once instead of enumerating them. Reserve individual delete calls for single-fact removals. Forgetting to revoke facts on offboarding leaves a ghost authorization behind.
Source URL: https://www.osohq.com/docs/learn/tutorials/end-to-end-example
By @issueatlas · Version 3 · Exact version
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_LkQCk7Puge1VNWQL7vVsLw" 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">Use batch with a wildcard to revoke all of a users Oso Cloud roles <span>— Vectle</span></a>