> For the complete documentation index, see [llms.txt](https://docs.pharos.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pharos.ai/configuration-guide/the-basics/pharos-running-user.md).

# Pharos Running User

Understand the Pharos running user concept and how to choose the right user for your org.

The Pharos running user is the Salesforce user identity under which Pharos executes all background operations. This user serves as the context for Pharos scheduled jobs and the email service that receives Salesforce exception notifications. Your choice of running user and the permissions you grant them directly affect what Pharos can see and do in your org.

Specifically, the running user is the **context user** for:

* **Pharos scheduled jobs** — All Pharos batch and scheduled Apex jobs (e.g., log processing, retention, monitoring) run under this user
* **The Pharos email service** — The service that receives exception notifications runs under this user. It is created when you enable [Apex Exception Tracking](https://docs.pharos.ai/configuration-guide/error-tracking/apex-exception-tracking.md) and related mechanisms in [Error Tracking](https://docs.pharos.ai/configuration-guide/error-tracking.md)

{% hint style="warning" %}
**Decide the running user before opening Pharos Admin.** The first user to open the Pharos Admin page becomes the running user by default. Log in as the intended user (or create a dedicated integration user) before you open Pharos Admin for the first time.
{% endhint %}

***

## Why Pharos Needs a Running User

Salesforce requires every background process to run in the context of a specific user. When Pharos processes an incoming exception email, checks for bulk API failures, or sends a notification to Slack, it does so using the running user's credentials and permissions.

The running user must have sufficient access to read data for log enrichment, execute Apex, and manage automation (flows, scheduled jobs, email services). Permissions are mostly for **log enrichment** — Pharos does not query your business data beyond what is needed to enrich log records. It only reads **metadata** and its own custom objects. For details on what Pharos installs and accesses, see [Core Metadata](https://docs.pharos.ai/configuration-guide/core-metadata.md).

{% hint style="info" %}
**Read-only operations:** Pharos operates in read-only mode for most tasks. It does not modify your business data. The running user does **not** need Modify All Data.
{% endhint %}

***

## Required Permissions

The running user must have the permissions required for all Pharos background operations. The simplest approach is to assign the **Log\_Admin** permission set, which grants the necessary access.

### Obtaining the Permission Sets

Pharos does not ship the Log\_Admin, Log\_Read, and Log\_Read\_Write permission sets within the managed package. These permission sets include **user permissions** (e.g., View All Data, Author Apex), which Salesforce does not allow in packaged metadata. You must deploy them separately.

The permission sets are available as a downloadable ZIP file: [pharos-permissions](https://resources.pharos.ai/pharos-permissions). Download and unzip it, then deploy the `pharos-permissions` folder to your org using your preferred tool (e.g., Salesforce CLI, VS Code with Salesforce extensions, or Change Sets).

| Permission Set       | Use Case                                                                       |
| -------------------- | ------------------------------------------------------------------------------ |
| **Log\_Admin**       | Running user and Pharos administrators — full access for background operations |
| **Log\_Read**        | View-only access to logs and issues                                            |
| **Log\_Read\_Write** | Edit access to logs and issues, tracing, and AI analysis                       |

Assign **Log\_Admin** to the running user to grant all required permissions.

### User Permissions Required

The running user needs these user permissions (all included in Log\_Admin):

| Permission                    | Why It's Needed                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **View All Data**             | Required for log enrichment — specifically, fetching recent deployments. Salesforce requires View All Data to query deployment metadata (e.g., `DeployRequest` in the Tooling API), which Pharos uses to correlate errors with recent deployments. See [Log Enrichment](https://docs.pharos.ai/platform-overview/pharos-platform-architecture/logs/log-processing/log-enrichment.md) for details on audit trail and deployment correlation |
| **Customize Application**     | Required for managing email services and package configuration                                                                                                                                                                                                                                                                                                                                                                             |
| **Author Apex**               | Enables execution of Pharos Apex processing classes                                                                                                                                                                                                                                                                                                                                                                                        |
| **Modify Metadata**           | Required for metadata operations and configuration                                                                                                                                                                                                                                                                                                                                                                                         |
| **Manage Custom Permissions** | Required for Pharos configuration                                                                                                                                                                                                                                                                                                                                                                                                          |
| **Manage Data Integrations**  | Required for connected orgs and integrations                                                                                                                                                                                                                                                                                                                                                                                               |
| **Manage Interaction**        | Required for email services and inbound email processing                                                                                                                                                                                                                                                                                                                                                                                   |
| **View Event Log Files**      | Required for event monitoring and log processing                                                                                                                                                                                                                                                                                                                                                                                           |
| **View Platform Events**      | Required for platform event–based logging (e.g., Triton)                                                                                                                                                                                                                                                                                                                                                                                   |
| **View Data Leakage Events**  | Required for security-related log enrichment                                                                                                                                                                                                                                                                                                                                                                                               |
| **View Roles**                | Required for user context in log records                                                                                                                                                                                                                                                                                                                                                                                                   |
| **View Setup**                | Required for configuration and setup access                                                                                                                                                                                                                                                                                                                                                                                                |
| **View Public Dashboards**    | Required for analytics and dashboards                                                                                                                                                                                                                                                                                                                                                                                                      |
| **View Public Reports**       | Required for analytics and reporting                                                                                                                                                                                                                                                                                                                                                                                                       |

<details>

<summary>Why View All Data for deployments?</summary>

Pharos enriches logs with **deployment history** — when an error occurs, it correlates the error with recent metadata deployments to help answer "Did a recent deployment cause this?" This enrichment queries deployment metadata (e.g., the `DeployRequest` object in the [Salesforce Tooling API](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/)). Salesforce requires **View All Data** to query these deployment records, as they are org-level metadata not governed by standard sharing rules. Without this permission, deployment correlation in log enrichment would not be available.

</details>

### Permissions NOT Required

| Permission          | Status                                                   |
| ------------------- | -------------------------------------------------------- |
| **Modify All Data** | ❌ Not needed — Pharos does not modify your business data |
| **Manage Users**    | ❌ Not needed                                             |
| **Manage Billing**  | ❌ Not needed                                             |

{% hint style="warning" %}
**Minimum privilege:** Avoid using a user with Modify All Data unless that user already has it for other reasons. Pharos follows a least-privilege model and only requires read access to your org's data.
{% endhint %}

***

## Choosing the Right User

You can use either your System Administrator account or a dedicated integration user. Each approach has trade-offs.

### Option 1: Your System Administrator Account

**Best for:** Small teams, initial setup, proof-of-concept environments.

Using your own admin account is the fastest path to getting started. Since most System Administrators already have the required permissions, no additional configuration is needed.

**Trade-off:** If this user is deactivated (e.g., the admin leaves the organization), Pharos background processes will stop until a new running user is assigned.

### Option 2: A Dedicated Integration User

**Best for:** Production environments, large teams, organizations with strict security policies.

Create a dedicated Salesforce user specifically for Pharos operations. Pharos recommends using a **System Administrator profile with a Salesforce license type** to avoid disruptions to core functionality. This user exists solely to run Pharos processes and is not tied to any individual team member.

**Advantages:**

* Not affected by personnel changes
* Clear audit trail — all Pharos operations are attributed to a recognizable service account
* Can be managed with a tighter, purpose-built permission set
* Aligns with Salesforce best practices for managed package operations

{% hint style="success" %}
**Recommended for Production:** A dedicated integration user ensures Pharos continues operating regardless of team changes. Name it something recognizable like "Pharos Service User" or "Pharos Integration" so its activity is easy to identify in audit logs.
{% endhint %}

***

## How the Running User Gets Set

By default, the running user is the user who first opens the Pharos Admin page. No separate configuration step is needed. To set the running user intentionally:

1. **Log in as the intended running user** — if using an integration user, you may need to [log in as that user](https://help.salesforce.com/s/articleView?id=sf.logging_in_as_another_user.htm\&type=5) first
2. **Open the Pharos app** and navigate to **Pharos Admin** — this user becomes the running user by default
3. **Run the Quick Start wizard** to complete initial setup and confirm the assignment

The wizard handles the assignment as part of the initial setup.

***

## Changing the Running User Later

If you need to change the running user after initial setup — for example, if the original user is being deactivated — do it from **Pharos Admin → Advanced → Pharos Running User**. Reassign it **before** the current user is deactivated, since Pharos cannot run background processes under a deactivated user. For step-by-step instructions, see [Change the Running User](https://docs.pharos.ai/configuration-guide/advanced/pharos-running-user.md).

***

## Verifying the Running User

Open **Pharos Admin → Advanced → Pharos Running User**. The page states who Pharos is currently running as, and shows the scheduled jobs and inbound email service operating under that context — see [Pharos Running User](https://docs.pharos.ai/configuration-guide/advanced/pharos-running-user.md) for the page in detail.

You can also check **Setup → Scheduled Jobs**, where Pharos jobs will show the running user as the submitter.

***

## Common Questions

| Question                                         | Answer                                                                                |
| ------------------------------------------------ | ------------------------------------------------------------------------------------- |
| Can multiple users be running users?             | No — Pharos uses a single running user for all background operations                  |
| Does the running user consume a license?         | Yes — the running user must be an active Salesforce user with a standard license      |
| What happens if the running user is deactivated? | Pharos background processes stop until a new running user is assigned                 |
| Can I use a Salesforce Platform license?         | The running user needs a full Salesforce license due to the View All Data requirement |

{% hint style="success" %}
**Next Step:** With the package installed and the running user concept understood, proceed to the [Quick Start](https://docs.pharos.ai/configuration-guide/quick-start.md) wizard to activate Pharos in your org.
{% endhint %}
