# Fix the Salesforce OAuth Error

<figure><img src="/files/4kAkv5y9BpyrtX94bfut" alt=""><figcaption></figcaption></figure>

This happens because Salesforce requires the **Stacksync a**pp to be installed and approved in your **Organization** before anyone can use OAuth.

## Install the Stacksync App in Your Salesforce Org

Before any user can create a Salesforce connection in Stacksync, the **Stacksync** App must be installed in your Salesforce org. This step only needs to be done **once**.

#### 1. Make sure the installer has the required permission

The user who performs the first OAuth authorization **must** have the Salesforce permission:

**“Approve Uninstalled Connected Apps”**

To enable it:

1. Go to **Setup**
2. Search for **Profiles**
3. Open the profile of the user who will install the app\
   (e.g., **System Administrator** or any user profile with this permission)
4. Enable **“Approve Uninstalled Connected Apps”**

<figure><img src="/files/ba3FeR9D0zR9LAFQ7QAX" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/ghZ3NVL8ZTMtwiLNiN95" alt=""><figcaption></figcaption></figure>

This permission lets the user approve and install connected apps.

#### **2. Perform the first OAuth authorization**

After the permission is enabled:

1. The user with that permission logs into **Stacksync**
2. Starts the **Salesforce OAuth flow**
3. Salesforce will show a prompt to **approve and install** the **Stacksync** App
4. Once approved, if you want other users in your organization to be able to install this app, go to **Setup → Connected Apps OAuth Usage**, find **Stacksync**, and click **Install.** After that, selected users will be able to authorize successfully.

<figure><img src="/files/sZ1bSUJqyWzvqGlp02yY" alt=""><figcaption></figcaption></figure>

## **Other Users Can Now Use OAuth**

Once the **Stacksync** app is installed, other Salesforce users  (for example, a dedicated “Stacksync Integration User” with limited permissions) should be able to complete the OAuth flow without any extra steps.&#x20;

If a user still encounters an OAuth error, go to **Setup → Connected Apps OAuth Usage**, find **Stacksync**, click **Install or** assign access. After that, the user will be able to authorize successfully.

***

## **Final Result**

* **One user with the proper permission installs the app once**
* **All other allowed users can now use OAuth to create Salesforce connections in Stacksync**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stacksync.com/two-way-sync/connectors/salesforce/authorize-salesforce/fix-the-salesforce-oauth-error.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
