Every organisation has a process for when an employee leaves. It is not perfect and it often runs late, but it exists. HR records a date, a ticket is created, accounts are disabled, licences are returned and devices are collected. There is a checklist, and someone is responsible for it.
Most organisations have no such process for AI agents. Someone builds an agent for a project. Later the project ends, or the workflow changes, or the person who wanted the agent moves to another team. In almost every case the agent stays as it was. It keeps its identity and its permissions, and it can still access the data it was connected to. Nobody uses it any more, and no system records that the agent is finished.
This post explains why that happens, why it is a risk, and what a leaver process for agents can look like.
Why agents don't get removed
Identity systems are built around three events in a person's time at a company: they join, they change roles, and they leave. These are often called joiner, mover and leaver.
Identities that don't belong to a person have only one event, which is the moment they are created.
An agent has no HR record, no manager and no last working day. For a person, the signal to clean up comes from outside the identity system. It comes from an HR process, and agents are not part of that process. So nothing starts the cleanup.
The problem itself is old. Service accounts have had it for thirty years. Most older organisations have a few service accounts that nobody wants to touch, because nobody knows what would stop working. What has changed is how fast new identities are created. Registering a service account was a deliberate technical task. It was done rarely, by a small number of people who understood what they were doing. Creating an agent is now about as easy as creating a document, and the people who create agents usually don't think about permissions.
In the past, an organisation gained a few of these identities per year. Now it can gain a few per week. The people who create them are usually not the people who will have to clean up.
Why an unused agent is riskier than an unused user account
An inactive user account is a risk. An inactive agent is usually a bigger one, for three reasons.
Nobody notices if it is misused. When an employee's account is taken over, the employee usually notices something. They see mail they didn't send or files they didn't open, or a colleague asks about a strange message. This is one of the most effective ways organisations detect attacks. An agent has no person who would notice.
It usually has broad access. Agents are built to be helpful, and an agent is more helpful when it can read more. An application is normally limited to one purpose. An agent is often connected to a knowledge source and given whatever access its identity needs to read it. From the first design discussion, the tendency is to give more access.
Its credentials are not renewed the way a person's are. There are no regular password resets and no MFA prompts. No manager confirms in an access review that the access is still needed, because access reviews are designed for people.
Together this means an unused agent is an identity with broad permissions, no monitoring and no owner. That is very useful to an attacker.
The three states an agent can be in
If you ask for a list of agents, you usually get a list of names. It is more useful to know which of three states each agent is in. Most tools don't show this.
Active and used. The agent does regular work for people who would notice if it stopped. This is fine.
Active and unused. The agent is still deployed and still has its permissions. It can still read everything it was given access to, but nobody has used it in ninety days. This is the risky state. In every configuration view it looks the same as the first state. The platform shows that the agent is running. It doesn't show whether anyone uses it.
Disabled or deleted. The agent has been cleaned up. This is rare.
Most of the risk is in the second state. You can only see it if you measure activity, because the configuration looks the same for used and unused agents. A list of agents shows what exists. A ranking by activity shows which agents people actually need. These two lists are usually very different.
One query is especially useful in practice: "which agents have done nothing in ninety days", sorted by how much data each one can reach. The result is a short list that you can act on. People rarely object to removing something that nobody has used for three months.
What a leaver process for agents looks like
This is a process problem and it can be solved. Most of the steps are the same as the ones you already use for people.
Give every agent an owner when it is created. The owner should be a named person. A team is not enough. This is the most valuable step and also the cheapest. If an agent has no owner, nobody can answer questions about it, and every later step needs someone to ask.
Give it a review date. Six months is reasonable. On that date, someone confirms that the agent is still needed. If nobody responds, the agent should be disabled. It should not simply continue. This way the safe result happens automatically when nobody acts. Review windows for other cleanup work follow the same principle.
Measure use as well as deployment. Record how often each agent is used and what data it accesses. An agent that hasn't been used for a long time should be reviewed. Inactivity is the one signal that reliably separates unused agents from used ones.
Connect it to the leaver process for people. When someone leaves, the checklist asks about their devices and licences. It should also ask which agents they built. An agent whose creator left the company six months ago is an obvious candidate for review. Today, most organisations have nothing that connects these two facts.
Monitor its behaviour while it exists. An agent does roughly the same amount of the same work every day, much more consistently than a person. So a change in its behaviour is a strong signal. For example, if the finance agent reads four times its usual number of files in one day, that is worth looking at.
The same problem in four other places
If you only fix this for agents, most of the problem remains. The same gap exists for:
- Service accounts, where the problem first appeared.
- OAuth application grants, where a user gave consent once, years ago, and the application still has its access.
- Guest accounts, which were invited for a project that has ended and were never removed. This happens because access comes from group membership and is not tied to the project.
- Sharing links, which give access without any identity attached and don't expire unless someone set an expiry date.
All four are created on purpose and never looked at again. They don't appear in reviews that are designed for employees. If you set up a process for agents, make it broad enough to cover these four as well. The approach and the query are the same.
How 1Security handles this
In 1Security, agents are their own type of resource. Microsoft has several kinds of agents in different places: declarative Copilot agents, Entra Agent ID agents with their own identity, and third-party SaaS agents that use Copilot in the background. 1Security shows them together. If the same agent appears in more than one place, it is shown as a single record.
Inactivity is measured from actual activity. The Activities screen has an "unused" view for agents, and also for users, apps, sites, files, groups, emails and devices. It ranks them by how long they have been idle, over periods up to all-time. So "agents nobody has used in ninety days" is a card on a board that you can open directly. The same view exists for apps, users and devices, which covers the wider problem described above.
For each agent, 1Security shows how much it can reach: how many files, sites, users and emails it can access, and which types of sensitive information are in that data. This turns the list of unused agents into a list of priorities. An unused agent that can reach nothing only needs tidying up. An unused agent that can reach a finance library needs attention sooner.
Behaviour is compared with each agent's own history. When an agent starts behaving differently from its own past, 1Security opens an anomaly for that agent. It doesn't rely on one threshold for the whole tenant.
There is also a way to fix what you find. Disabling an unused application or reclaiming an unused licence is offered as a suggested automation. It shows a live count of what it currently matches. Changes go through a review window first, so nothing is switched off without warning.
Frequently asked questions
Isn't deleting an unused agent risky? Start by disabling it, because that can be undone. Then wait a month. If nothing breaks and nobody complains, delete it. The review window approach works here too. You plan the change, give people time to object, and go ahead if nobody does.
How do we find agents nobody remembers creating? Start from the identity side. For Entra-backed agents this needs no extra licensing. Then sort by last activity. Agents with no owner and no recent use will be at the top. Declarative Copilot agents can be listed when the tenant has Agent 365, because that is where Microsoft's API provides them.
What if the creator has left? This is the most urgent case, and it is the reason to connect agents to the leaver process for people. If the owner has left, nobody can confirm that the agent is still needed. The only sensible option is to disable it and see whether anyone misses it.
Do access reviews cover this already? Almost never. Access reviews are designed for people and the resources that people use. Identities that don't belong to a person are usually outside their scope, and that is why so many of them are left behind.



