דלגו לתוכן

Agents Come and Go

תוכן זה אינו זמין עדיין בשפה שלך.

Module 6 of 6 in the chapter Agents and Identity, chapter 17 of Securing Salesforce: Identity and Access. Each module stands on its own.

The question this module answers: Who looks after an agent’s identity, from the day it’s made to the day it’s gone?

Chapter 12 was about people joining and leaving: who makes the user, who changes it when they move, and who makes sure leaving reaches every system. An agent is the same, with one difference that makes it worse. A person who leaves stops coming to work. An agent nobody remembers keeps working, with its user, its permissions and its tokens, until someone turns it off.

So treat every agent like a new joiner. It gets an identity on day one, a job and access that fits it, someone who’s responsible for it, regular reviews, and a leaving date.

In my own work, I run a small team of AI agents on Salesforce projects, and I give each one “a role, its own access and a shared design.” That isn’t a security slogan. It’s how you know which agent did what, and how you stop one agent’s mistake from becoming every agent’s.

Salesforce builds that in for service agents. When you create one, you create or choose its agent user, and Salesforce makes it “with minimal access so that your agent is secure by default” (S4). Then you add what the job needs, and no more (module 1; the data side in the Data Architect course). Only admins can see or edit agent users (S4).

Two small habits from Salesforce’s own Help, both about knowing what you have. Give each agent user a first name that matches its agent, and make a list view of users with the Einstein Agent User profile, so you can find them all (S4). Chapter 16’s audit questions are much easier when every agent has a name.

And the rule from module 1, which applies to every agent’s identity, inside or outside Salesforce: “Never assign system administrators as running users” (S1). An agent outside Salesforce gets its own integration user and its own external client app (module 2), never a shared one.

Every few months: what did it actually use?

Section titled “Every few months: what did it actually use?”

Agents grow. A new action here, a permission there, because something didn’t work in testing. Six months later, the agent user can do much more than the agent does.

Salesforce’s architects suggest a review: “review Event Monitoring to identify which granted permissions the agent actually exercised… Then remove any unused permissions” (S1). They’re careful about which log answers which question: the Setup Audit Trail shows “who changed the configuration and when,” not what the agent used at run time (S1). Event Monitoring needs Shield or the add-on outside a Developer Edition org (chapter 16, module 5).

Review its apps too. Every external client app an agent uses has refresh tokens, scopes and a list of who may use it (chapter 13). Put them in the same review.

You’ll want to stop an agent quickly. Agentforce Builder has an Activate/Deactivate toggle for each agent, and Salesforce’s architects call it “your immediate response to a compromised or malfunctioning agent” (S1). They also say to treat it as a runbook item: who may deactivate, when, and how to “verify deactivation actually took effect” rather than trusting the toggle (S1).

And here’s a gap to know before you need it. Salesforce’s architects say the Setup Audit Trail “is not a complete record” of changes to an agent’s configuration, and that “agent activation and deactivation events” don’t appear in it at all (S1). Their advice is to manage agent configuration like any other metadata, through a deployment pipeline with an approval step (S1). Chapter 16’s “who changed the door?” needs another answer for agents.

If the agent signs in from outside, stopping it is chapter 13 again: revoke its tokens on the OAuth Usage page, or block the app.

When an agent is retired, its identity has to go with it, the same as a person’s: its user deactivated, its permission sets removed, its external client apps and tokens revoked, its MCP connections removed (chapter 12, module 4: leaving has to reach everything). An agent user that outlives its agent is a way in nobody is watching. Salesforce Help doesn’t say what happens to a service agent’s user when the agent itself is deleted, so don’t leave it to chance: deactivate it yourself.

Here’s the question an auditor or an incident review will ask, and Salesforce’s architects list it in four parts (S1):

  • Which agent did it?
  • What configuration was it running?
  • What running user gave it its permissions?
  • “Which human manager or business owner is accountable for the agent’s scope and behavior?”

Their rule: design so that “every action traces back to an accountable identity—the owner accountable for the agent, and the user whose work it acts on—rather than collapsing into a single shared account” (S1).

The accountability chain The accountability chain for an agent. The action, a record changed or a message sent, traces to the agent, which one and its configuration, which runs as its running user, the person or its agent user. The request that started it came from the person it acted for, if there was one, and every agent has an owner, a named person accountable for it. A decision that matters, about production, money or a customer, stops at a checkpoint in the workflow, not an instruction to the agent, where a person approves, not another agent. Marked amber: a shared account for every agent breaks every link, collapsing them into one name, and leaves nobody accountable and no way to trace it. Footnote: after Salesforce Architects, Trust for the Agentic Enterprise, checked 2026-11-20. {"author": "Steve Simpson", "blueprint": "1.0.0", "builder": "standard 1.59.0", "built": "2026-11-20", "id": "DGM-IAM-AGI-07", "rights": "\u00a9 2026 Twinshark LLC. All rights reserved.", "template": "cells 0.5.0", "theme": "stevetecharc 1.4.0"} WHAT HAPPENED TRACES TO AND THEN TO The action a record changed, a message sent The agent which one, and its configuration Its running user the person, or its agent user The request what started it The person it acted for if there was one The agent's owner a named person, accountable A decision that matters production, money, a customer A checkpoint in the workflow not an instruction to the agent A person approves not another agent A shared account for every agent Every link collapses into one name Nobody accountable and no way to trace it traces to runs as came from and stops at where breaks leaves After Salesforce Architects, Trust for the Agentic Enterprise, checked 2026-11-20. HOW TO READ IT a person at the end of the chain the chain broken © 2026 Twinshark LLC · stevetecharc.com
Click to enlarge

My own version of that rule, from running agents every day: agents “never treat another agent’s note as an approval,” and “a person approves what reaches production.” An agent can draft, check and suggest. A person decides. Salesforce’s architects say the same in their own terms: a required approval belongs in the workflow, as a checkpoint “outside the agent’s reasoning path,” not as an instruction the agent might ignore (S1).

You’ve drawn the agent as one more lane (module 1), chosen its door (module 2), decided how much of a person it carries (module 3), followed the person across the hops (module 4), opened the door for tools (module 5), and given the agent a beginning, a middle and an end (this module). It’s the same course, with one more kind of user.

The practice does both halves: one lab app called as itself and as Priya, then the lanes for three Steve Trucking agents. Then chapter 18 puts the whole course together, in a strategy and a design review.

  • An identity of its own for every agent: its own user, its own app, never an administrator.
  • A named owner for every agent, accountable for what it does.
  • A review of what each agent actually used, and its tokens.
  • A runbook to stop an agent, and a pipeline for changing one.
  • A leaving date, and everything its identity touched, removed with it.