cd /news/ai-agents/when-someone-leaves-their-api-keys-s… · home › topics › ai-agents › article
[ARTICLE · art-173066] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=· neutral

When someone leaves, their API keys stay: how to offboard the access people create

A developer published a step-by-step offboarding playbook for revoking the non-human access — service accounts, API keys, OAuth grants and AI agent connections — that departing employees leave behind. The guide recommends requesting a written inventory of credentials in the first week of notice, verifying it against identity-provider, cloud, secret-manager and SaaS logs, assigning each item a named owner, and rotating shared secrets, citing Verizon's 2025 DBIR finding of a 94-day median time to remediate leaked GitHub secrets and IBM's 2025 report that 97% of organizations breached through AI models or applications lacked proper AI access controls.

recommendation

When someone leaves, revoke each AI agent's tokens in the source app and rebuild still-needed work under a dedicated identity with a named owner, since agents connected 'as me' inherit the person's full access.

more in playbook: Securing agents and AI tools
by read3 min views2 publishedNov 20, 2026

Most offboarding checklists stop at the same point: disable the login, collect the laptop, remove the person from the group chat. That handles the person. It doesn't handle what the person built.

Over a year or two, an engineer, analyst or ops lead creates access that isn't tied to their own sign-in. A service account for a nightly job. An API key pasted into a reporting script. An OAuth grant that lets a SaaS tool read the shared drive. And now, an AI agent connected to their mailbox or the ticketing system. Some of this breaks loudly when they leave. Most of it keeps running with nobody watching.

The quiet part is the risk. Verizon's 2025 Data Breach Investigations Report says credential abuse is still the most common way attackers get in, and that the median time to remediate leaked secrets found in a GitHub repository was 94 days. A key with no owner is a key nobody rotates.

This is the order I'd work in.

In the first week of notice, ask the person leaving for a written list: every service account, API key, token, webhook, scheduled job and AI tool they set up or connected. They know more than any scan will find. Make it a handover task with a due date, not a favour.

Memory misses things, so verify. Look in:

Anything the systems show that isn't on their list goes to the top of the review.

A person, not a team. "The data team" owns nothing at 2 a.m. when a job fails. The new owner should know what the item does and be able to say whether it still needs to exist.

They probably had access to more secrets than they created: shared vault folders, .env files, config for tools they administered. Rotate those too. It isn't about trust. Former employees' laptops and password managers get compromised like anyone else's.

Cut interactive access on the last day as normal. Hold off deleting the account until steps 3 to 5 are done, because in some platforms deleting a user also removes or breaks what they owned. Then watch the logs for a week for failed authentications tied to the old account. Each one is something you missed.

Agents are where this gets harder each month. An agent connected "as me" inherits everything that person could do, and it may keep its own saved connections outside your identity provider. IBM's Cost of a Data Breach Report 2025 found that 13% of organisations reported breaches of AI models or applications, and 97% of those said they lacked proper AI access controls. For each agent the person connected, revoke its tokens in the source app (not only inside the agent), and if the work still matters, rebuild it under a dedicated identity with an owner.

The real win is never having to rebuild this from memory again. Three habits cover most of it:

You can do all of this with admin consoles and a spreadsheet. It's slower, and it depends on someone remembering every time, so it's worth automating the discovery step once you've done it by hand a couple of times. Whatever you use, the steps above are what matter: an owner, a decision and a rotation for everything a departing person leaves behind.

Originally published on my Substack: https://nurankhan.substack.com/p/when-someone-leaves-their-api-keys

── more in #ai-agents 4 stories · sorted by recency
── more on @verizon 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/when-someone-leaves-…] indexed:0 read:3min 2026-11-20 · —