> ## Documentation Index
> Fetch the complete documentation index at: https://docs.provar.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Salesforce permissions

> What your Salesforce administrator needs before connecting your org to TrustAI, and what TrustAI adds to the org.

Your Salesforce administrator connects your [Salesforce org](https://docs.provar.dev/glossary.md#salesforce-org) to TrustAI. This page
lists the permissions they need first, and what TrustAI adds to your org when they connect it. Share it with
your administrator, or with your security team if they approve new tools.

## Who needs the permissions

The administrator who clicks **Authorize in Salesforce** on TrustAI's [connector](https://docs.provar.dev/glossary.md#connector)
form needs them. They sign in to your org as themselves, and TrustAI sets itself up using their access.

TrustAI doesn't create a new Salesforce user. After setup, it works in your org as the administrator who
connected it. In TrustAI, this account is called **Connection admin**.

## The permissions

The simplest choice is an administrator whose Salesforce user has Salesforce's **System Administrator**
profile. That profile has the permissions TrustAI needs to add its setup components to your org.

If the administrator's user has a different profile, check it against this list. TrustAI lists three Salesforce
permissions for the administrator who authorizes:

* **Author Apex**
* **Modify Metadata Through Metadata API Functions** (TrustAI calls it **Modify Metadata**)
* **Customize Application**

TrustAI also says that your org must approve uninstalled connected apps.

A user with **Modify All Data** still needs **Author Apex**. In our check, a user who had every permission on this
list except **Author Apex** was stopped before TrustAI added anything. We didn't test a user missing one of the other
two, so give the administrator all three.

## What TrustAI adds to your org

Before it adds anything, TrustAI checks that the administrator can deploy. This check changes nothing in your
org. Then TrustAI adds these components:

* An External Client App named **TrustAI Connector**, followed by a code of letters and numbers. TrustAI signs
  in to your org through it.
* An Apex class, **TrustAIConnectorTokenExchange**, and its test class,
  **TrustAIConnectorTokenExchangeTest**.
* A token exchange handler, **TrustAI Connector Token Exchange**, that runs that class.
* A custom metadata type, **TrustAI Connector Config**, with one record that holds the connection's settings,
  and a custom object, **TrustAI Connector Runtime**.
* A permission set, **TrustAI Connector Access**. After setup, the administrator who connected has it. It lets
  that user run the token handler's Apex class.

## If something goes wrong

| What you see | What to do |
| - | - |
| Setup stops at **Check the admin can deploy**, and TrustAI says **This needs an administrator** | The Salesforce user you signed in as can't add TrustAI's setup components. Click **Details** to see which permission it's missing, such as **Author Apex**. Then either ask an administrator whose Salesforce user has the permissions on this page to connect the org, or add the missing permission to your Salesforce user and click **Try again**. |

## Next

* [Start here](https://docs.provar.dev/index.md#connect-your-salesforce-org): connect your Salesforce org, step by step.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.