Gå til innholdet

Who Is the Agent?

Dette innholdet er ikke tilgjengelig på ditt språk.

Module 1 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: When an agent acts, who is it, and who is it acting for?

In chapter 1, I asked you to draw a login as a swim lane: one lane for each party, an arrow for every call, and an arrow back for every answer. The browser, the login server, the instance. Whoever shows the login screen decides who you are.

Now put an agent in it. Priya asks an agent in Salesforce to summarize her open cases and draft a reply to one customer. Draw it, and there’s a new lane between Priya and Salesforce: the agent. The agent reads the cases. The agent drafts the reply. The agent, maybe, sends it.

So every call that agent makes raises a question we never had to ask about the browser. The browser just carried Priya’s requests. The agent decides what to ask for. And when it asks, Salesforce has to know two things:

  1. Who is this? The question this whole course has been answering.
  2. Who is it acting for? The new one.

Sometimes the answer to both is the same: the agent is acting as Priya, with Priya’s access. Sometimes it isn’t: the agent has its own identity, and acts for a customer who has never had a Salesforce login. Getting that second answer right is most of this chapter.

Priya asks an employee agent Priya asks an employee agent, drawn as a swim lane with three lanes: Priya, the agent, and Salesforce. First, Priya asks the agent to summarize her open cases; the agent runs as Priya, so the answer to who it is acting for is Priya, and it answers that it's working on it. Second, the agent asks Salesforce for her cases, as Priya; Salesforce checks Priya's access, her profile, permission sets and sharing, and answers with only the cases Priya can see. Third, the agent drafts the summary and a reply from what came back and gives them to Priya, who sends it or changes it. Footnote: an employee agent runs as the logged-in user; Salesforce Help, checked 2026-11-20. {"author": "Steve Simpson", "blueprint": "1.0.0", "builder": "standard 1.59.0", "built": "2026-11-20", "id": "DGM-IAM-AGI-01", "rights": "\u00a9 2026 Twinshark LLC. All rights reserved.", "template": "cells 0.5.0", "theme": "stevetecharc 1.4.0"} PRIYA THE AGENT SALESFORCE 1. Asks the agent summarize my open cases Runs as Priya who is it acting for? Priya 2. Asks for her cases as Priya Checks her access her profile and sharing 3. Reads the summary and the draft reply Drafts the answer from what came back the request working on it a query, as Priya only what Priya can see the summary and draft send it, or change it An employee agent runs as the logged-in user. Salesforce Help, checked 2026-11-20. HOW TO READ IT Priya's own access decides © 2026 Twinshark LLC · stevetecharc.com
Click to enlarge

Here’s the rule that makes the rest of this chapter simpler. In Salesforce, an agent never runs as nobody. Salesforce’s own architects put it this way: “every agent acts under a Salesforce identity—its running user—that determines what the agent can reach” (S1). The running user is either the person who’s signed in, or an identity you set up for the agent (S1).

That’s the same idea you met in chapter 11, with the impersonation flows: whose name is on the change? For an agent, the running user is whose name is on everything it reads and does.

Agentforce has three answers, and which one you get depends on the kind of agent and where it’s talking (S3).

An employee agent runs as the person. Priya’s agent in Lightning Experience, the mobile app or Slack “operate[s] under the logged-in user’s execution context. The user’s profile, permission sets, and sharing rules/role determine the agent’s actions and responses” (S3). The agent can’t see anything Priya can’t. Who may use the agent at all is set by permission sets or profiles (S3).

A service agent runs as its own agent user. When Amara, a customer, chats with a service agent on the company’s website, there may be no Salesforce login behind her at all. So the agent can’t borrow her access. Instead it runs as a dedicated user record, the agent user, named EinsteinServiceAgent User, “with all of the permissions that the agent needs to do its job” (S3). Salesforce creates it “with minimal access so that your agent is secure by default” (S4); you add what the job needs.

A service agent on a site can run as the customer. If Amara is logged in to an Experience Cloud site (chapter 14), and the agent is deployed there with Enhanced Chat and credential-based user verification turned on, the agent runs as her: “the logged-in site user,” with her profile, permissions and sharing (S3). Her login, from chapters 14 and 15, is now the agent’s boundary too.

There’s a fourth kind worth a line: a Lead Nurturing agent, which emails prospects on its own, runs as its own dedicated user too (S3).

Who the agent runs as Who the agent runs as. Priya, an employee, signed in to Salesforce: an employee agent runs as Priya, the logged-in user, and her profile, permission sets and sharing decide what it reaches. Amara, a customer, not logged in: a service agent runs as its agent user, EinsteinServiceAgent User, and the agent user's access decides; it's created minimal, and you add what the job needs; marked amber, because knowing who she is doesn't narrow it. Amara, logged in to the site, with credential-based user verification: the service agent runs as Amara, the logged-in site user, and her site profile and sharing decide. Footnote: Agentforce, as Salesforce Help describes it, checked 2026-11-20. {"author": "Steve Simpson", "blueprint": "1.0.0", "builder": "standard 1.59.0", "built": "2026-11-20", "id": "DGM-IAM-AGI-02", "rights": "\u00a9 2026 Twinshark LLC. All rights reserved.", "template": "cells 0.5.0", "theme": "stevetecharc 1.4.0"} WHO'S TALKING THE AGENT RUNS AS WHAT DECIDES ITS ACCESS Priya, an employee signed in to Salesforce Priya an employee agent: the logged-in user Priya's access profile, permission sets, sharing Amara, a customer not logged in Its agent user a service agent: EinsteinServiceAgent User The agent user's access created minimal; you add what the job needs Amara, logged in to the site credential-based user verification Amara a service agent: the logged-in site user Amara's access her site profile and sharing so it runs as limited by so it runs as limited by so it runs as limited by Agentforce, as Salesforce Help describes it, checked 2026-11-20. HOW TO READ IT the person's own access the agent's own access: knowing who she is doesn't narrow it © 2026 Twinshark LLC · stevetecharc.com
Click to enlarge

Look at the middle case again. Amara isn’t logged in, but she’s typed her email address, and maybe a code sent to it. The agent knows who it’s talking to. Doesn’t that mean it can only see her records?

No. And Salesforce says it in one sentence I want you to remember: “Context variables tell the agent who the user is but don’t control data access” (S3). The agent still runs as the agent user. And “without additional configuration, the customer has access to all of the records that the agent user has access to. You must proactively limit data access” (S3).

That’s the difference this whole course has been about, between identification and authorization, showing up in a new place. Knowing who someone is, and controlling what they can reach, are two separate jobs. Module 3 shows how Salesforce narrows a service agent to one verified customer.

So the first design decision for any agent is its running user, and it’s an identity decision before it’s a data decision. Salesforce’s architects ask it at every hop of their threat model: “Who is this operation actually running as?” (S1). And they name the pitfall: “An elevated service account invoked by a guest user, turning the anonymous user into a backdoor to a super-user” (S1).

Their advice is blunt: “Never assign system administrators as running users to avoid permission troubleshooting during development. That convenience creates agents whose effective scope is the entire org” (S1).

What the agent user may read and do, field by field and record by record, is a data access question, and two other courses own it: Data Architect, chapter on data security, module 4 (“Treat an Agent Like a Curious Human”), and Sharing and Visibility’s chapter on agents. This chapter stays at the door: who the agent is, how it gets in, and whose authority it carries.

Module 2: agents at the door. When the agent lives outside Salesforce, which of the course’s doors does it use?

  • The running user for every agent: the person, its own agent user, or the verified site user.
  • Who may use each agent at all.
  • Never an administrator as an agent’s running user, not even in development.
  • Where “who she is” ends and “what she may reach” begins for every customer agent.