Sub topic 13
Permissions, data access, and the Einstein Trust Layer
This chapter assumes you know the Salesforce data model, permission sets and profiles, and the basics of topics and actions in Agentforce Builder. It explains what limits an action's reach and what protects the data sent to the language model.
Actions run as a user
An action does not get special access of its own. It runs in the context of a user, and Salesforce checks that user's permissions as it would for any other request. In an employee-facing agent, the context is the person chatting. In a service agent, it is the running user you configure for the agent.
Three layers of access control apply:
- Object permissions decide whether the user can read, create, edit, or delete a type of record.
- Field-level security decides which fields the user can see or change.
- Sharing rules decide which individual records the user can reach.
If a user cannot see an Account, a record lookup action returns nothing for it. The agent then reports that it found no match. It cannot read the record and tell the user about it anyway.
The Einstein Trust Layer
Actions fetch data, and the agent then sends prompts to a large language model (LLM). The Einstein Trust Layer sits between Salesforce and the model. It applies these protections to each prompt and response:
- Secure data retrieval grounds the prompt in data the user is allowed to see.
- Dynamic grounding adds the record context the task needs.
- Data masking replaces sensitive values, such as names and emails, with placeholders before the prompt leaves Salesforce.
- Zero data retention means the model provider does not store the prompt or the response.
- Toxicity detection scores the response for harmful content.
- Demasking restores the original values in the final answer.
- Audit trail records the interaction for later review.
Where the layers stop
The Trust Layer does not replace permissions. Permissions decide what data an action can fetch. The Trust Layer decides how that data is handled once it is in a prompt. Neither one decides whether the agent should be allowed to do a task. Topic instructions handle that part, for example by requiring confirmation before an update.
Common errors
- Testing as an administrator. You see every record, so the agent seems to work. A user with fewer rights gets empty results. Test with a representative user.
- Assuming the agent can reach hidden fields. If field-level security hides a field, the agent cannot read or update it. A missing field in a summary is often a permission problem, not an agent bug.
- Giving a service agent's running user too much access. The agent can reach whatever that user can reach. Grant the minimum.
- Treating masking as a guarantee. Masking covers the patterns it detects. Avoid putting secrets in topic instructions, because instructions are part of every prompt.
Exercise
A sales rep asks the agent for the details of an Account. The agent says it cannot find the record, but an administrator finds it easily. What is the most likely cause, and where do you check first?
Show answer
The rep's user lacks access to the record, through object permissions or sharing rules. The action runs with that user's permissions, so the lookup returns nothing. Check the rep's permission sets and the sharing settings for the Account, then retest as the rep.