Automation · People operations
How to build employee offboarding deprovisioning
Somebody left in March and still has access to the CRM. Here is the model behind offboarding that closes properly, the prompts that build it, and what it takes to run in production.
Built with Tray Headless
- System Workday
- Step Inventory holdings
- Step Transfer ownership
- Step Revoke everywhere
- Step Verify
- System Okta
Transfer happens while the account still works, and every revocation is verified instead of assumed.
The short answer
What is offboarding deprovisioning?
Offboarding deprovisioning is four parts: revocation timed to the leave date rather than to a ticket, coverage of every system a person could hold rather than the ones anybody remembers, transfer of what they owned before the account is disabled, and evidence that each revocation completed. What sinks most attempts is coverage. Disabling the identity provider feels like offboarding, but every system with a local account, an API key or a personal integration survives it.
What matters here
- Disabling the identity provider is not offboarding. Local accounts, API keys and personal integrations all survive it.
- Transfer before you disable. Files, calendars, workflow ownership and open records become unreachable the moment the account goes.
- Reconcile against every system instead of trusting the revoke call. A revocation that silently failed looks identical to one that worked.
- Handle the immediate case separately. A hostile departure is minutes, not a scheduled job at midnight.
- Report people who left and still hold access. That number should be zero, and if nobody produces it, it never is.
Who this is for
You run IT operations or security. Offboarding runs on a ticket somebody raises, coverage depends on who remembers which systems, and the last access review found accounts belonging to people who left last year.
How it works in practice
The path from a resignation to the access actually being gone.
- 1
The HRIS termination record starts the clock
Leave date and type: standard notice, immediate, or contractor expiry. The type decides the timing.
- 2
Everything the person owns is inventoried first
Files, calendars, workflow ownership, open records, API keys and personal integrations, before anything is disabled.
- 3
Ownership is transferred while the account still works
A file transfer after the mailbox is disabled is a support ticket and sometimes a data loss.
- 4
Revocation runs across every system, not only identity
Federated access, local accounts, API tokens, shared credentials the person knew, and anything with a personal integration.
- 5
Each revocation is verified, not assumed
The call returning success and the access actually being gone are different facts.
- 6
A standing report lists anybody who left and still holds access
It should read zero, and it will not on the first run.
What deprovisioning is made of
Offboarding is not disabling an account. It is four parts, and the second one is where the risk actually sits.
Leave-date timing
Scheduled to the minute for a standard departure, immediate for a hostile one. The type of departure decides the schedule, not the ticket queue.
Coverage of every system
Federated apps, local accounts, API keys, service accounts and personal integrations. The identity provider is the first system, not the only one.
Transfer before disable
Files, calendar, workflow ownership, open opportunities and tickets, all moved while the account still functions.
Verified evidence
Each revocation confirmed against the system instead of assumed from a success response, and recorded for the access review.
The Tray Headless prompts
Paste these into Claude Code or Codex with the Tray Headless plugin installed. Each stage runs on its own. The systems named in them are the worked example rather than a requirement, and every prompt says so.
Once per project, run
/tray-workflows:set-workspace
to pick the workspace these build in. Point it at a sandbox first.
- 1
Set up, then inventory what a person can actually hold
You cannot revoke what you never enumerated.
Headless skills
build-workflowtray-patternsUse build-workflow. The systems in play are Workday, Okta, Google Workspace, Salesforce, Jamf, Jira and Snowflake, or whatever we run in those seats. Before you plan anything, tell me which of them are already authenticated in the workspace, because I do not want a connector stubbed that I have not authenticated. The detail that matters most is Okta and every system that has local accounts, not federated ones. I need to know, for each system, whether access is federated, local, or both, and how API tokens are issued and revoked. Build me the inventory of what one person can hold. Anything not on that list will survive offboarding, so it is the most important artefact here.
- 2
Transfer ownership before disabling anything
Because after the account is gone, a transfer is a support ticket.
Headless skills
build-workflowtray-patternsUse build-workflow. Trigger on a Workday termination record. Before any revocation, inventory and transfer: Drive files and folders, to the manager unless a successor is named Calendar ownership for recurring meetings the person organised Any workflow, integration or scheduled job they own Open Salesforce opportunities, cases and tasks Jira tickets assigned or reported Shared mailbox and distribution list memberships Any API token or service account created under their name Transfer while the account still works. A file whose only owner is a disabled account is a support request and occasionally a data loss.
Workflow and integration ownership is the one most often missed. A scheduled job owned by a leaver keeps running until it needs a credential refresh, then fails at the worst moment.
- 3
Revoke everywhere, in the right order
The identity provider is the first system, not the only one.
Now revoke, ordered so nothing locks you out of the next step: 1. Sessions and refresh tokens, so an open laptop stops working now 2. API tokens and personal access tokens across every system 3. Federated application access through Okta 4. Local accounts in systems that do not federate, one at a time 5. Shared credentials the person had access to, flagged for rotation 6. The identity itself, suspended rather than deleted 7. The device, remote locked and wiped Suspend rather than delete. Deleting an identity often orphans the audit trail attached to it, and that is the record you will need.
- 4
Handle the immediate departure as its own path
Because a hostile exit is measured in minutes.
Headless skills
tray-gotchastray-patternsUse tray-gotchas, then build a separate immediate path. When the termination type is immediate, revocation runs first and transfer happens afterwards from an admin context. Sessions and tokens die within minutes, not at midnight on the leave date. Also handle these: Notice period. Access continues until the leave date, then goes at a specific time, not whenever a nightly job runs. Contractor expiry. The end date is known at the start, so schedule it then rather than hoping somebody raises a ticket. Rehire. The suspended identity may return. Never restore it with its historical access intact; re-derive from the current role profile.
- 5
Verify, and report the ones still holding access
A revoke call returning success and the access being gone are different facts.
After each revocation, verify against the system rather than trusting the response. Query the access back and confirm it is gone. Then produce a standing report: every person with a termination date in the last 12 months who still appears in any connected system. Include what they hold and how long it has been. That report should read zero. It will not on the first run, and the first run is the point. Alert on any non-zero value instead of emailing it into a folder.
- 6
Check it end to end, then hand it to IT
So a new system joining the estate joins the offboarding path too.
Run the per-step schema checks and the whole-workflow audit before this touches production. Then open the same workflow in Tray Build so IT operations can add a system to the coverage list in the visual canvas. New tools are adopted constantly, and every one of them that is not on the list is an account that survives somebody leaving.
What it connects to
Offboarding has to reach every system a person could hold, which is more than the ones that federate.
Workday
Read the termination with its leave date and type, which decides whether this is scheduled or immediate.
Reads
Okta
Revoke sessions and tokens, remove application assignments, and suspend instead of delete the identity.
Reads and writes
Google Workspace
Transfer file and calendar ownership, then suspend the account and set mail delegation.
Reads and writes
Salesforce
Reassign open opportunities, cases and tasks before the user is deactivated.
Reads and writes
Jamf
Remote lock and wipe the device, and confirm it came back instead of assuming.
Reads and writes
Jira
Reassign assigned and reported issues, and transfer any automation the person owned.
Reads and writes
Snowflake
Land every revocation with its verification, so the leavers-still-holding-access report is a query.
Writes
Same build, other stacks
The design does not change if you run something else in one of these seats. The same prompts build it against Microsoft Dynamics 365, Google BigQuery, Azure Active Directory, SAP SuccessFactors, ServiceNow or HubSpot.
Named systems are the ones most teams run, not the only ones that work. Each is an authentication in your Tray workspace, referenced by name, so the workflow never holds a credential. Where we have a connector page, the name links to it.
Running it in production
This is a security control with a compliance obligation attached. It gets tested.
It lives on the platform, not in a terminal window
Scheduled revocation, the immediate path and verification all execute on the same engine, with a run history per departure.
Every revocation is verified and recorded
Confirmed against the system, not assumed from a response, with the platform audit trail behind it. That is what an auditor asks for.
Managed credentials, not secrets in a config file
Deprovisioning needs admin access to every system a person can hold, which is the most powerful credential set in the company. It lives in your workspace, scoped and audited.
IT owns the coverage list
Systems and their revocation methods open in Tray Build. A new tool that is not on the list is an account that survives a departure.
The standing report is the control
People who left and still hold access, refreshed continuously. Nobody finds that number without producing it deliberately.
Questions people ask
Is disabling the identity provider enough?
No, and this is the most common failure. Local accounts, API tokens, personal integrations and shared credentials all survive an Okta suspension, and none of them appear in the place people look.
Why transfer before revoking?
Because a file whose only owner is a disabled account, or a scheduled workflow owned by a leaver, becomes a support ticket at best. Transfer while the account still functions.
How should an immediate departure differ?
Revocation runs first and transfer happens afterwards from an admin context. Sessions and tokens die within minutes instead of at the next scheduled run.
Should the identity be deleted?
Suspend, not delete. Deleting frequently orphans the audit trail attached to that identity, which is exactly the record needed if the departure is later disputed.
What is the single most useful report?
Everybody with a termination date in the last twelve months who still appears in any connected system. It should read zero, and until somebody builds it, it never does.
Vibe-coding app guides
Vibe-code an entire app with Helix
This moves the data between systems. It does not give anybody a screen to work in. Build that app in Claude Code, Codex or Cursor, then deploy and run it governed on Tray Helix. Same kind of guide, same kind of prompts.
How to build an onboarding and offboarding tracker (opens helix.tray.ai in a new tab)
Related guides
People operations
How to build employee onboarding provisioning
Drive it from the HRIS, derive access from the role instead of a copied colleague, sequence around the start date, and prove it happened. The prompts that build it.
IT and security
How to build SaaS licence reclamation
Find the seats nobody uses, ask before you take, reclaim on a schedule, and put the saving where finance sees it. The Headless prompts that build it.
IT and security
How to build a device lifecycle sync
Reconcile what management sees against what finance owns and what HR says, and make an unassigned device an exception instead of a row. The prompts.
Last reviewed September 2026.