# Agent user, run context and private actions

*Agentforce Specialist Study Guide · AI Agents · Last updated October 15, 2026 · https://www.certifyforce.com/study-guide/agentforce-specialist/ai-agents/agent-user-run-context-and-private-actions*

Whose permissions an agent uses: the Service agent's agent user, the logged-in user for Employee agents and authenticated site users, flow and Apex run context inside actions, and how verified IDs, session identifiers and filters keep private actions scoped to one customer.

- Certification: Salesforce Agentforce Specialist
- Exam section: AI Agents
- Study guide: https://www.certifyforce.com/study-guide/agentforce-specialist

**Official exam objective:**

> Explain the security context in which the agent is actually running, and how it impacts agent action execution.

## What the exam expects

- Identify the user an agent runs as: the agent user for a Service agent with unidentified or verified customers, the logged-in user for an Employee agent or an authenticated site user.
- Configure an agent user with least privilege and fix permission errors when an action reaches a new object.
- Predict what a flow-backed or Apex-backed action can read and change from its run context.
- Secure private actions: identify the customer per messaging configuration, scope queries with session or verified IDs, and gate actions with filters.
- Key terms: **agent user** (the dedicated EinsteinServiceAgent User a Service agent runs as); **run context** (user or system context that decides a flow's access); **private action** (an action that reads or changes one customer's data); **VerifiedCustomerId** (the variable the Customer Verification subagent, formerly topic, fills after verification); **context variable** (session data such as MessagingSession.ContactId that identifies but does not restrict); **AuthSession** (the authenticated session an Experience site login provides).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Employee agent identity | Runs in the logged-in user context | [Employee Agent Template](https://help.salesforce.com/s/articleView?language=en_US&id=ai.agent_employee_agent_setup.htm&type=5) |
| Service agent default identity | EinsteinServiceAgent User, Einstein Agent license and profile, minimal access | [Configure Service Agent Access](https://help.salesforce.com/s/articleView?language=en_US&id=ai.agent_user.htm&type=5) |
| Where to grant agent user access | [Agent_Name]_Permissions permission set, plus a role and sharing rules | [Configure Service Agent Access](https://help.salesforce.com/s/articleView?language=en_US&id=ai.agent_user.htm&type=5) |
| Who can edit an agent user | Only users with admin permissions | [Configure Service Agent Access](https://help.salesforce.com/s/articleView?language=en_US&id=ai.agent_user.htm&type=5) |
| Flow-backed action requirements | At minimum, Run Flows plus access to objects used in the flow; flow's FLS and sharing apply | [Create a Custom Action](https://help.salesforce.com/s/articleView?id=ai.agent_actions_custom.htm&language=en_US&type=5) |
| Record-triggered flow context | System context without sharing | [Flow Run Context](https://help.salesforce.com/s/articleView?id=sf.flow_concepts_running_user.htm&language=en_US&type=5) |
| Enforcing user context | Screen and autolaunched flows, API 68.0 and later | [Set Flow Run Context](https://help.salesforce.com/s/articleView?language=en_US&id=platform.flow_distribute_system_mode.htm&type=5) |
| Flow called from Apex | Always ignores object and field-level access | [Flow Run Context](https://help.salesforce.com/s/articleView?id=sf.flow_concepts_running_user.htm&language=en_US&type=5) |
| External-app verification | Identifier saved to MessagingEndUser; no AuthSession, valid until token expiry | [Add User Identification](https://help.salesforce.com/s/articleView?language=en_US&id=ai.service_agent_secure_actions_implement.htm&type=5) |
| Verified ID storage | Customer Verification subagents store it in VerifiedCustomerId | [Configure Service Agent Access](https://help.salesforce.com/s/articleView?language=en_US&id=ai.agent_user.htm&type=5) |

## Check yourself

- Why does OTP verification not change whose permissions govern access?
- When does a user-context flow behind an action run with system access anyway?
- Why can't an authentication passed by User Verification from an external app be revoked immediately?
- Which permission does the identity running a flow-backed action need?

## Sources

- [Configure Service Agent Access](https://help.salesforce.com/s/articleView?language=en_US&id=ai.agent_user.htm&type=5)
- [Add User Identification to Agentforce Actions](https://help.salesforce.com/s/articleView?language=en_US&id=ai.service_agent_secure_actions_implement.htm&type=5)
- [Flow Run Context](https://help.salesforce.com/s/articleView?id=sf.flow_concepts_running_user.htm&language=en_US&type=5)
- [Set Flow Run Context](https://help.salesforce.com/s/articleView?language=en_US&id=platform.flow_distribute_system_mode.htm&type=5)
- [Create a Custom Action](https://help.salesforce.com/s/articleView?id=ai.agent_actions_custom.htm&language=en_US&type=5)
- [Create a Custom Agent Action in the Legacy Builder](https://help.salesforce.com/s/articleView?language=en_US&id=ai.copilot_actions_custom.htm&type=5)
- [Create an Agent from an Agentforce Employee Agent Template](https://help.salesforce.com/s/articleView?language=en_US&id=ai.agent_employee_agent_setup.htm&type=5)
- [Create an Agent from an Agentforce Service Agent Template](https://help.salesforce.com/s/articleView?language=en_US&id=ai.service_agent_setup.htm&type=5)
- [Configure Your Agent](https://help.salesforce.com/s/articleView?id=ai.copilot_topics_actions.htm&language=en_US&type=5)
- [Agent Types and Considerations](https://help.salesforce.com/s/articleView?id=ai.agent_setup_explore_types.htm&language=en_US&type=5)
- [Considerations for Agentforce Service Agent](https://help.salesforce.com/s/articleView?id=ai.service_agent_considerations.htm&language=en_US&type=5)
- [Connect an Agent to Slack](https://help.salesforce.com/s/articleView?id=ai.agent_deploy_emp_slack.htm&language=en_US&type=5)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 18 linked practice questions, and unlimited timed mock exams are included with the Agentforce Specialist pack (USD $19): https://www.certifyforce.com/practice-exams
