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

# Salesforce Authentication

> Connect Monumint to your Salesforce org with OAuth 2.0.

Monumint connects to Salesforce as a dedicated integration user through an External Client App, using the OAuth 2.0 Client Credentials flow. Monumint never holds a Salesforce password, and you can revoke access at any time by disabling the app.

## Connect with OAuth

**1. Create an integration user**

In Setup, go to **Users** and click **New User**. Set **User License** to
**Salesforce Integration** and **Profile** to **Minimum Access - API Only
Integrations**. Then assign the user the **Salesforce API Integration**
permission set license. You will grant object access on the next page,
[Permissions](https://docs.monumint.com/integrations/salesforce/permissions.md).

**2. Create an External Client App**

In Setup, open **External Client App Manager** and click **New External
Client App**. Name it `Monumint` and set **Distribution State** to
**Local**. Under **API (Enable OAuth Settings)**, check **Enable OAuth**,
enter `https://app.getomni.ai` as the **Callback URL**, add the **Manage
user data via APIs (api)** scope, and check **Enable Client Credentials
Flow**. Click **Create**.

**3. Set the Run As user**

On the app's **Policies** tab, click **Edit**. Under **OAuth Policies**,
check **Enable Client Credentials Flow** again and set **Run As
(Username)** to the integration user. Under **Plugin Policies**, set
**Permitted Users** to **Admin approved users are pre-authorized**. Click
**Save**.

**4. Copy the connection details**

On the app's **Settings** tab, open **OAuth Settings** and click **Consumer
Key and Secret** to copy both values. Then copy your org's URL from
**Setup > My Domain**. It looks like `https://yourcompany.my.salesforce.com`.

**5. Connect in Monumint**

In Monumint, go to **Integrations**, select **Salesforce**, and choose
**OAuth 2.0 (Client Credentials)**. Paste the My Domain URL, consumer key,
and consumer secret, click **Test connection**, and then click **Save**.

> [!NOTE]
>
> Salesforce can take a few minutes to apply new app settings. If the
> connection test fails right after setup, wait a few minutes and try again.

To rotate the secret, generate a new one in the app and paste it into Monumint. To revoke access, disable the app or deactivate the integration user.

## Restrict access by IP address

You can limit the integration user to Monumint's outbound IP addresses, so the credentials only work from Monumint's servers. Contact your Monumint representative for the address list.

1. In Setup, open the integration user's profile and add each Monumint address under **Login IP Ranges**.
2. On the External Client App's **Policies** tab, set **IP Relaxation** to **Enforce IP restrictions**.
3. Click **Test connection** in Monumint, then confirm in Salesforce **Login History** that the request came from a Monumint address.

Use the profile's Login IP Ranges rather than the org-wide **Network Access** setting. Network Access only skips identity verification for trusted addresses. It does not block other addresses.

## Username and password (legacy)

Existing connections can still sign in with the integration user's username, password, and security token, along with a login URL of `https://login.salesforce.com` for production or `https://test.salesforce.com` for a sandbox. These connections break whenever the password expires or is reset, so we recommend moving to OAuth.

## Troubleshooting

| Error | Fix |
| - | - |
| `invalid_client` | The consumer key or secret is wrong, or the app settings have not applied yet. |
| `no client credentials user enabled` | Set the **Run As (Username)** on the app's **Policies** tab. |
| `request not supported on this domain` | Use your My Domain URL, not `login.salesforce.com`. |


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