The Agent User Is an Internal User, So Give It Only What Its Job Needs
Bu içerik henüz dilinizde mevcut değil.
Module 2 of 6 in the chapter Beyond the Record: Agents, chapter 20 of Securing Salesforce: Sharing and Visibility. Each module stands on its own.
The question this module answers: A service agent runs as its own user. What does that user need, and what in your sharing model does it inherit without anyone asking?
The user nobody logs in as
Section titled “The user nobody logs in as”An employee agent needs nothing new here. It runs as the person using it, and that person’s access is already designed (module 1).
A service agent is different. It talks to customers and partners, often with no login behind them, so it runs as a user of its own: the agent user. Here’s what Salesforce creates for you, in its own words (Configure Service Agent Access (opens in a new tab), Salesforce Help, checked 2026-11-26):
- Name: EinsteinServiceAgent User
- User license: Einstein Agent
- Profile: Einstein Agent User
- Org-wide sharing defaults: Internal
- Permission sets: Agentforce Service Agent Secure Base, and one named for your agent, [Agent_Name]_Permissions, plus a permission set group with what the agent needs to run
And then the sentence I like: “The agent user is created with minimal access so that your agent is secure by default. To support your use cases, expand your agent user’s access, based on the principle of least privilege.”
So it starts nearly empty. Your job is to add exactly what its work needs, the same way you would for any person. A Lead Nurturing agent has its own agent user too, and everything below applies to it the same way.
Objects and fields: from its actions
Section titled “Objects and fields: from its actions”Start with what the agent actually does. An agent works through actions: flows, Apex and prompt templates. Salesforce says the agent user “requires the minimum level of object permissions for each object that the agent interacts with via flows, Apex, or prompt templates,” and “object permissions for agent users are handled the same way as they are for regular users”: you edit the [Agent_Name]_Permissions permission set (same page).
So list the agent’s actions, and from them the objects and fields each one reads or changes. That list is the permission set. Nothing that isn’t on it.
Here’s where the subsystem permission sets from chapter 3 module 3 pay off. Each team that builds a subsystem ships a read-only, a user and an admin permission set. A person’s access is an assembly across those. An agent’s should be too, and usually from the read-only ones. The subsystem team decides whether its subsystem needs an agent level at all. If it does, the team ships one, like any other level.
And it gets its own access. I’d give each agent its own agent user, rather than one agent user shared by every agent. Then each one carries only its job, and when you look at what an agent can reach, you’re looking at one agent. Salesforce’s tip helps when you have several: name each agent user after its agent, and keep a list view of users with the Einstein Agent User profile (same page).
Records: a role of its own
Section titled “Records: a role of its own”Object permissions say the agent may read cases. They don’t say which cases. That’s the file cabinets, and Salesforce sends you straight there: “Assign the agent user to a role that lets the agent view or edit the records that it interacts with. When assigning a role, consider the role hierarchy for your org… Follow the principle of least privilege” (same page).
Everything from Part 2 applies:
- Where the role sits is what it sees. A role high in the tree inherits every record below it (chapter 6). Put the agent user in a role of its own, low in the tree, with nothing under it, and open records to it on purpose.
- The role’s child access counts too. An account the agent can see can open its contacts, opportunities and cases, depending on the role’s settings (chapter 10 module 3).
- What it creates, it owns. Records the agent creates are owned by the agent user, and an owner-based sharing rule on that user shares every one of them at once (chapter 8).
The surprise: internal defaults
Section titled “The surprise: internal defaults”Here’s the part I’d put on a slide in red. Look at that list again: org-wide sharing defaults, Internal. Salesforce says it twice on the same page: when a service agent runs as the agent user, “org-wide sharing defaults (OWD) for internal users apply.”
Now remember Salesforce’s own example from chapter 6 module 2: your employees may read every account, so the internal default is Public Read Only, and the external default is Private, so partners can’t. That’s a good design for people.
Now put a service agent on the customer site. It talks to people from outside. But it runs as an internal user, so the internal default applies: Public Read Only. Every account in the org is in its answer set. The external default you set so carefully protects your partners’ logins, and does nothing for the agent talking to them.
Salesforce’s advice, from the same page: “Restrict your OWD for internal users to limit record access for all internal users. Create sharing rules to selectively grant access, excluding the Einstein Agent User where appropriate.”
Two things follow:
- A wide internal default is now a customer-facing decision. If a service agent reads an object, look at that object’s internal default as if a customer could ask about every record it opens. Sometimes the answer is to tighten the default. Sometimes it’s to narrow what the agent’s actions can return (module 4 and module 6).
- Sharing rules reach it like any internal user. As far as a rule is concerned, the agent user is one more internal user. A rule that shares with every internal user shares with the agent too. Leave it out where it doesn’t need the records.
Never a System Administrator
Section titled “Never a System Administrator”The fastest way to make an agent work in a demo is to make its user a System Administrator. Salesforce’s architects name that exact mistake: “Never assign system administrators as running users to avoid permission troubleshooting during development. That convenience creates agents whose effective scope is the entire org. Agents exercise permissions programmatically at scale in ways human administrators never would” (Trust for the Agentic Enterprise (opens in a new tab), Salesforce Architects, Well-Architected, checked 2026-11-26).
The same page gives the habit that keeps it honest: grant “exactly what the agent needs, nothing more,” then after go-live “review Event Monitoring to identify which granted permissions the agent” actually uses. That’s chapter 19: learn what normal looks like for the agent user, then take away what it never touched.
Test knowledge. Know that every object has an internal and an external org-wide default, and which users each applies to; that the role hierarchy grants access to records owned below a role; and that a user’s role, permission sets and the org-wide defaults together decide what records it can see. For agents, beyond the exam: a service agent’s agent user is an internal user, created with minimal access, so the internal defaults apply to it. A likely area, not a known question.
What an architect decides here
Section titled “What an architect decides here”- Which agent user each service agent runs as, one per agent, named after it.
- The objects and fields each agent’s actions touch, and the read-only subsystem permission sets that cover them.
- The agent user’s role: where in the tree, with nothing under it, and what sharing opens to it on purpose.
- For every object a service agent reads: is the internal default right, now that a customer can ask?
- Which sharing rules should leave the agent user out.
- When the agent user’s access is reviewed against what it actually used.
Beyond the exam: what AI changes. This module is the AI change. Every rule above was already true for an integration user. What’s new is that this integration user answers questions from outside, in plain language, all day.
Explore
Section titled “Explore”- Configure Service Agent Access (opens in a new tab), Salesforce Help (checked 2026-11-26)
- Trust for the Agentic Enterprise (opens in a new tab), Salesforce Architects, Well-Architected (checked 2026-11-26)
- Org-Wide Defaults, chapter 6 module 2
- Permission Set Groups, chapter 3 module 3
