An orphaned machine credential is a key, token or software account that still works but has no owner.
This guide is for anyone who looks after apps, cloud services or IT, and for managers who sign off leavers. You do not need to write code. If someone who set up your systems has left, they may have left working keys behind.
In short
- Apps, scripts and AI tools prove who they are with keys, tokens, certificates and service accounts. These are machine credentials.
- When the person or project behind one ends, the credential often keeps working. Nobody is watching it.
- Anyone who finds or copies an orphaned credential may be able to act as that software.
- Find them, ask who uses them, then either give each one a new owner or switch it off, wait, and delete it.
What you will learn
- Explain how machine credentials become orphaned.
- Spot the signs of a credential that nobody owns.
- Check where orphaned keys tend to hide.
- Describe a safe way to retire one without breaking things.
- Software account (non-human identity)
- an identity used by an app, script, server or AI agent, not by a person.
- Software password (credential)
- the key, token, password or certificate a program uses to prove who it is.
- Back-up owner (fallback owner)
- a second person or team who takes over if the main owner leaves.
What is an orphaned machine credential?
Think of a spare key left under the doormat after a tenant moves out. The new tenant does not know it is there. The key still opens the door for anyone who finds it.
A machine credential is the secret a program uses to prove who it is. It may be a key, or a short-lived pass called a token. It becomes orphaned when nobody looks after it any more. Often the person who created it has left, or the project it served has ended.
A well-known open security project lists poor clean-up of these identities as a top risk. One example it gives: a developer leaves, and a key tied to their app stays active, unknown to anyone [1].
Where the comparison stops working: a door key opens one door. A machine credential may open many systems at once, and it can be copied without anyone noticing.
This page is about finding and safely retiring machine credentials. For staff leaver accounts, see Orphaned and Dormant Accounts for Beginners. For how to set up owners in the first place, see NHI Ownership for Beginners.
Why does it matter?
Staff leavers usually go through a checklist. Software accounts often do not, so their keys can stay valid long after anyone remembers them.
If you manage people
What could happen: a developer leaves, and the keys they created for the company's apps keep working with nobody watching them.
Check this: add "which software accounts and keys did this person own?" to your leaver checklist.
If you look after cloud or IT systems
What could happen: an old app account still has wide rights, and an attacker who finds its key can use them.
Check this: look for accounts and keys with no recent use and no named owner.
If you build or run AI tools
What could happen: a trial AI agent is abandoned, but its keys to email or files still work.
Check this: give every agent an owner and an end date when it is created.
What does it look like?
Here is a made-up list of machine credentials from a review. It shows the signs that point to orphans.
Example only. All values are made up.
Name Type Owner Last used invoice-sync-FAKE API key J.EXAMPLE (left) 3 days ago (1) old-report-bot-0000 service acct (none) 14 months (2) deploy-EXAMPLE token Platform team today (3) web-cert-FAKE certificate (none) in use (4) trial-agent-EXAMPLE API key (none) never (5)
- Still in use, but the owner has left. In a real file, this line would show a key that needs a new owner and a fresh value.
- No owner and no use for over a year. A likely candidate to switch off.
- Owned by a team and in use. This one looks healthy.
- In use but with no owner. If it expires, nobody will be told.
- Created for a trial and never used. Likely safe to retire, after checking.
Why this is risky: four of the five have no current owner. Nobody will notice if their keys are copied or misused.
The safer way: give lines 1 and 4 a named owner and a back-up owner. Switch off lines 2 and 5, watch for errors, then delete them.
How does it work?
Credentials become orphaned in a few common ways:
- Someone creates a credential for a task. A developer, admin or supplier sets up a key or account for an app or script.
- The credential is saved somewhere. It may sit in a settings file, a build pipeline, a password tool or on a laptop.
- The person or project moves on. They leave, change team, or the project ends. The credential is not on any leaver checklist.
- It keeps working. Many keys have no end date, so they stay valid. Nobody reviews them.
- Someone else finds it. An attacker who finds an old key may use it to reach systems or data. The same project warns that such identities can be used to reach critical systems and to stay hidden [1].

Cloud providers build in tools for this. Two examples, listed alphabetically:
- Amazon Web Services shows when each access key was last used. It suggests making an old key inactive first, not deleting it at once. Then it can be turned back on if an app still needs it [2].
- Microsoft Entra can flag app registrations that have not been used for over 90 days. It suggests reviewing each one, then soft-deleting apps that are not needed and waiting 15 days before deleting them completely [3].
What if a credential is still needed? The open security project mentioned above suggests a new owner and a fresh secret, since the person who left may know it [1].
A worked example
Leila Hollis manages a small online travel company. Her lead developer, Otto Engel, is leaving after six years. The HR leaver checklist covers his laptop, email and building pass.
Leila asks Otto to spend his last week listing every software account and key he set up. He finds eleven. They include a key for the payment service, a token that lets the website send emails, and a service account for nightly backups.
For each one, they ask three questions. Is it still used? What breaks if it stops? Who will own it now?
Seven are still needed. Leila names a new owner for each, and a back-up owner from another team. The new owners then replace each key with a fresh one, because Otto had seen the old values.
Four are not needed. One was for a booking tool the company stopped using last year. Instead of deleting them straight away, the team switches them off and watches for errors for two weeks. One small report fails, so they switch that key back on and give it an owner. The other three are deleted.
Leila adds a new line to the leaver checklist: "Hand over every software account and key." Every six months, she will review machine credentials again.
Myths and mistakes
| What people think | What is true |
|---|---|
| Disabling the leaver's account also stops their keys. | Keys and service accounts made for apps usually keep working on their own. They need their own check. |
| An unused key is harmless. | If it still works, anyone who finds it may be able to use it. Unused keys are prime candidates to remove. |
| Delete everything with no owner at once. | Some may still run important jobs. Switch off first, watch, then delete. |
| Handing a key to a new owner is enough. | The person who left may know the old value. Change the secret as part of the handover. |
| Only big companies have this problem. | Small firms often rely on one or two people for all setup, so a single leaver can leave many keys behind. |
What can I do this week?
- Add "software accounts and keys" to your leaver checklist.
- Ask your cloud or IT team for a list of keys and app accounts with their last-used date.
- Pick the five oldest unused ones and find out who, if anyone, needs them.
- Name a back-up owner for your most important software accounts.
- For anything no longer needed, switch it off and set a date to delete it.
Checklist
- Every machine credential we know of has a named owner.
- Important ones also have a back-up owner or owning team.
- Our leaver checklist covers software accounts and keys.
- Keys handed to a new owner are changed to a fresh value.
- Unused credentials are switched off before they are deleted.
- We review machine credentials on a schedule.
- AI agents and trial tools get an owner and an end date when created.
Common questions
How is this different from an orphaned staff account?
A staff account belongs to one person and is usually closed when they leave. Machine credentials belong to apps and scripts. They are often made by one person, used by many systems, and missed by leaver checklists. So they need their own review.
Where do orphaned keys usually hide?
Often in places people forget. These include settings files, build and deploy tools, shared password tools, cloud consoles and old laptops. Any place a developer once saved a key is worth checking, along with the key lists in your cloud accounts.
Should I just delete every unused key?
Not straight away. Something may still depend on it, such as a monthly report. Switch it off first and watch for errors for a while. If nothing breaks, delete it. If something does, turn it back on and give it an owner.
What is a fallback owner?
A second person or team who takes over a software account if the main owner leaves or is away. It means there is always someone to ask, and someone who will notice if the account is misused or about to expire.
Do AI agents create orphaned credentials too?
Yes, they can. AI agents use keys and tokens to reach email, files and other tools. A trial agent that is left running, or forgotten, can keep that access. Treat agents like any other software account: owner, purpose and end date.
Where next?
Ready for the detail? Read the practitioner guide: NHI Offboarding and Decommissioning Guide. It goes further into deciding what to retire, a staged decommissioning process, and the evidence and metrics that show it worked.
Also useful:
- How to assign owners to orphaned service accounts
- Orphaned and Dormant Accounts
- NHI Lifecycle Management for Beginners
- Non-Human Identities for Beginners
Related NHI Mgmt Group resources: NHI Ownership for Beginners, Orphaned and Dormant Accounts for Beginners and Secrets Management for Beginners.
Key terms
- Non-human identity
- An identity used by software, such as an app, service account, API key, bot or AI agent, rather than by a person.
- Orphaned NHI
- A non-human identity that is still active but has no clear owner, purpose or plan for retirement.
- Orphaned credential
- A key, token or password that still works after its owner or system has gone.
- Fallback ownership
- A back-up owner or team that takes over when the main owner is away or has left.
- Service account
- An account used by an app or automated tool, not by a person.
- Credential rotation
- Replacing a key or password with a new value, so the old one no longer gives access.
- Non-human identity inventory
- The list of machine identities, with who owns each one and whether it is still needed.
Sources and further reading
- OWASP Non-Human Identities Top 10 project, "Improper Offboarding", OWASP Non-Human Identities Top 10 2025. https://owasp.org/www-project-non-human-identities-top-10/2025/1-improper-offboarding/ (accessed 2 Dec 2026).
- Amazon Web Services, "Update access keys", AWS Identity and Access Management User Guide. https://docs.aws.amazon.com/IAM/latest/UserGuide/id-credentials-access-keys-update.html (accessed 2 Dec 2026).
- Microsoft, "Microsoft Entra recommendation: Remove unused applications", Microsoft Learn. https://learn.microsoft.com/en-us/entra/identity/monitoring-health/recommendation-remove-unused-apps (accessed 2 Dec 2026).