> For the complete documentation index, see [llms.txt](https://docs.oort.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.oort.io/integrations/salesforce-integration.md). Agents can also search and read this documentation through its [MCP server](https://docs.oort.io/~gitbook/mcp).

# Salesforce

## Overview <a href="#overview" id="overview"></a>

Identity Intelligence integrates with your Salesforce org to capture user account activity and, when Agentforce is enabled, your Agentforce agents. This helps you:

* Identify unused Salesforce accounts and reduce licensing costs
* Review Salesforce authentication activity and maintain security compliance
* Detect unauthorized access or use of your Salesforce org
* Discover your Agentforce agents, their topics, actions and flows, who uses them, and when they were last active

Salesforce and Agentforce uses one integration - the same run-as user, permission set and External Client App - you set it up once and get both pieces of data.&#x20;

### Pre-requisites

* A Salesforce admin account
* A Salesforce edition with API access: **Enterprise** or above, or **Developer Edition**
* A free **Salesforce** user license for the run-as user (see Step 1)
* For Agentforce: Agentforce enabled in your org. Without it, the Salesforce integration still works and Agentforce stays off
* If API access to Salesforce is restricted by IP address, coordinate with your Identity Intelligence representative or open a TAC case

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2Fz14FrDPeET8KaSleKsiF%2Fimage.png?alt=media&amp;token=4b406323-923f-4b16-be31-93c5e62d8f85" alt="" width="539"><figcaption></figcaption></figure>

### Salesforce API limits

Identity Intelligence monitors API usage against your Salesforce org's daily limit. If API usage reaches **75%** of the daily quota, Identity Intelligence stops collecting for that day and resumes the following day.

This also applies to Agentforce. In a large org, Agentforce data can take several daily runs to appear.

## Salesforce Configuration <a href="#salesforce-configuration" id="salesforce-configuration"></a>

### Create a run-as user

Salesforce has no app-only permissions. The [External Client App](#create-the-external-client-app) gets its token on behalf of this user, and every API call runs with this user's license and permissions. We highly recommend creating a dedicated user, rather than using an actual human's account. That way Identity Intelligence gets only the permissions below, and collection doesn't break when someone leaves or changes role.

1. In Setup, enter **Users** in **Quick Find**, select **Users**, then select **New User**
2. Fill in the required fields (marked red):
   * **Last Name**, **Alias** and **Nickname**: any values, such as "Identity Intelligence"
   * **Email**: a mailbox your team reads
   * **Username**: in email format, and unique across all Salesforce orgs, such as `cii-integration@yourcompany.com`. You need it again for the [#create-the-external-client-app](#create-the-external-client-app "mention") section

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2Fotugoz67NpZgTjK6uJfA%2F01-new-user-form.png?alt=media&amp;token=f9ab3f62-729b-4b93-8785-60e91bcc4478" alt="" width="563"><figcaption></figcaption></figure>

3. Set **User License** to **Salesforce**

* Salesforce lists only license types that have a free seat. If **Salesforce** isn't in the list, all your full Salesforce licenses are in use. Free one up by deactivating an unused user, or purchase an additional license
* Don't use **Salesforce Integration** as a user license. Agentforce objects return `INVALID_TYPE` with it

4. Set **Profile** to **Minimum Access - Salesforce**. The profile list depends on the license, so choose the license first. Don't use **Minimum Access - API Only Integrations**. The permissions come from the permission set in the [#create-the-permission-set-and-assign-it](#create-the-permission-set-and-assign-it "mention") section

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2FVzNrlSLB7R7L6XyqSVay%2F01b-new-user-license-salesforce-profile-minimum-access.png?alt=media&amp;token=c952fc42-fc38-43fb-8701-558b173d9fbd" alt="" width="563"><figcaption></figcaption></figure>

5. Select **Save**. The run-as user never signs in, so you can ignore its activation email. Then proceed to the next section

{% hint style="info" %}
The run-as user doesn't need the **API Only User** permission. If your edition offers it, our best practice recommendation is that you add this permission to stop the user from signing in to the Salesforce UI directly.
{% endhint %}

### Create the permission set and assign it

After you have completed the steps listed in the [#create-a-run-as-user](#create-a-run-as-user "mention") section, you can begin this section.

1. In **Quick Find**, enter **Permission Sets** and select **Permission Sets**. Select **New**, the small button above the list, left of the refresh icon. Don't use **Create New View**; that only creates a list view

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2FbPNq1z1kFXkBh0FwmRCa%2F02a-permission-sets-list-new-button.png?alt=media&amp;token=4ff658a2-a859-4706-9c7b-eb7e836e7561" alt=""><figcaption></figcaption></figure>

2. On **Permission Set Create**, enter a **Label**, such as "Cisco Identity Intelligence". **API Name** fills in by itself. Leave **License** as **--None--**, and select **Save**

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2FiUT8eIPjEsBgdYzjCCdQ%2F02b-permission-set-create.png?alt=media&amp;token=c6abeffe-507e-4529-9d6e-e3d22d2d323c" alt=""><figcaption></figcaption></figure>

3. The new permission set's page opens. Scroll down past the **Apps** section. Under **System**, select **System Permissions**, then select **Edit**

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2FbN4lTnGGJcMTwkHucaBQ%2F02c-permission-set-overview.png?alt=media&amp;token=0d8b55f3-6148-4bda-806d-cb32f0b5d3e0" alt=""><figcaption></figcaption></figure>

4. Select the following permissions. When Salesforce asks to add dependent permissions, accept. Then select **Save**

<table><thead><tr><th width="255.107666015625">Permission</th><th>Why Identity Intelligence needs it</th></tr></thead><tbody><tr><td>API Enabled</td><td>API access</td></tr><tr><td>View Setup and Configuration</td><td>Reads Agentforce setup: agents, versions, topics, actions, instructions and flows</td></tr><tr><td>Customize Application</td><td>Reads the Agentforce conversation logs, which give last activity and agent users</td></tr><tr><td>Manage Custom Permissions</td><td>Granted together with Customize Application</td></tr><tr><td>Manage Users</td><td>Reads login history and login geolocation for all users. It replaces Manage Internal Users and Manage External Users</td></tr><tr><td>View Setup Audit Trail</td><td>Not used yet; it's for upcoming Salesforce non-human identity support. It's requested now so you only set up once. Select it explicitly: from Spring '27, new permission sets no longer get it automatically</td></tr></tbody></table>

**Customize Application** can also change setup. Salesforce has no read-only permission for conversation logs, so Identity Intelligence needs it to read them. Identity Intelligence only reads data.

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2FPzOYLqFkHsUtTBMhZean%2F02d-system-permissions-edit.png?alt=media&amp;token=11393e8a-b76d-4944-85f5-e60f7edf7c8b" alt=""><figcaption></figcaption></figure>

5. Select **Manage Assignments** in the button row at the top of the permission set's page, then select **Add Assignment**. Tick the run-as user, select **Next**, and then select **Assign**

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2FRrUTI4yc2PrjpwlgM5Q2%2F02e-manage-assignments.png?alt=media&amp;token=0731a61b-a562-42d8-a6b8-ecc0e8085c46" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2FJ6DvMWRj8u6VUO57mKtG%2F02f-add-assignment-select-user.png?alt=media&amp;token=daf2189e-e05a-4692-a561-14d59a183af7" alt="" width="563"><figcaption></figcaption></figure>

### Create the External Client App

Identity Intelligence signs in to Salesforce through this app, using the OAuth client-credentials flow. The app gives you the consumer key and secret to enter in Identity Intelligence, and it runs every API call as the run-as user. Identity Intelligence gets only that user's permissions, and no password or interactive sign-in is needed.

1. In **Quick Find**, enter **External Client App Manager** and select it. Select **New External Client App** at the top right

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2FYY2WG2SYakF7sM89dQ6r%2F03a-eca-manager.png?alt=media&amp;token=350e9383-4e34-404b-903e-fbd70a54d484" alt=""><figcaption></figcaption></figure>

2. Under **Basic Information**, fill in the required fields:
   * **External Client App Name**: such as "Cisco Identity Intelligence". **API Name** fills in by itself
   * **Contact Email**: where Salesforce can reach you about the app
   * **Distribution State**: keep **Local**, which means the app is used only in this org
   * The other fields are optional

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2Fvsc9pDxMY4n5yJyd81lP%2F03b-eca-new-basic-information.png?alt=media&amp;token=0492abf6-452b-4bac-b173-1a77e99ab6e2" alt=""><figcaption></figcaption></figure>

3. Expand **API (Enable OAuth Settings)** and check **Enable OAuth**. An **App Settings** section appears
4. In **App Settings**, enter a **Callback URL**. It's required but not used: enter `https://login.salesforce.com/services/oauth2/success`
5. Under **OAuth Scopes**, select **Manage user data via APIs (api)** in **Available OAuth Scopes** and select the right arrow to move it to **Selected OAuth Scopes**. Add no other scope

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2FPlRKrA0xGGWbNt5W4WDI%2F03c-eca-new-oauth-callback-scopes.png?alt=media&amp;token=94e924c9-dbcd-4beb-aa69-58a0ceb3c82a" alt=""><figcaption></figcaption></figure>

6. Under **Flow Enablement**, check **Enable Client Credentials Flow**. Leave the **Security** options as they are; they don't apply to this flow, and some are locked. Select **Create**

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2Fwa03VLRftdLAs4wrLZTj%2F03g-eca-flow-enablement-security.png?alt=media&amp;token=a6e02361-dd5b-4388-b481-2855fdd45bb5" alt=""><figcaption></figcaption></figure>

7. The app's page opens on the **Policies** tab (the other tabs are **Settings** and **Package Defaults**). Select **Edit**, then expand **OAuth Policies**. Under **OAuth Flows and External Client App Enhancements**, check **Enable Client Credentials Flow** and enter the run-as user's username in **Run As (Username)**. Select **Save**

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2F3UbTz43ziNMUizvGI5I9%2F03d-eca-app-page-policies-tab.png?alt=media&amp;token=15a90e91-0bc8-4046-ba9f-4af603bed6fd" alt=""><figcaption></figcaption></figure>

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2FphPlwFRx1PhJRvqdeszi%2F03e-eca-policies-client-credentials-run-as.png?alt=media&amp;token=793e41f2-56e0-4289-b8cb-1f86c2bcd505" alt=""><figcaption></figcaption></figure>

8. Open the **Settings** tab and expand **OAuth Settings**. Under **App Settings**, select **Consumer Key and Secret**; it opens in a new tab. Salesforce may ask you to verify your identity. Copy the **Consumer Key** and **Consumer Secret** to a secure location, such as a key vault
9. In **Quick Find**, enter **My Domain** and select it. Copy **Current My Domain URL** and add `https://` in front, for example `https://yourcompany.my.salesforce.com`. This is the **Salesforce URL** in Identity Intelligence

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2FEVWUrZS4RRclvTKKZW2M%2F03h-my-domain-url.png?alt=media&amp;token=f9b8508c-5c8a-4497-9632-1eec8161b317" alt=""><figcaption></figcaption></figure>

To return to the app later, open **External Client App Manager** and select the app's name. **External Client Apps > Settings** in the Setup menu is the org-wide settings page, not the app's page.

Changes can take up to 10 minutes to apply. Once complete, proceed to the next section.&#x20;

### Identity Intelligence dashboard configuration

1. Login to Identity Intelligence with an admin account and go to the **Integrations** tab
2. Select the ***Add Integration*** button
3. Locate the Salesforce tile and select ***Add Integration*** within the tile

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2FH0rFXpHHyaSbMSonjDBp%2Fimage.png?alt=media&amp;token=0c6156ad-3807-45e9-98af-19d9612b98f5" alt="" width="233"><figcaption></figcaption></figure>

4. Fill in the integration details with the values from the [#create-the-external-client-app](#create-the-external-client-app "mention") section
   * **Display Name**
   * **Salesforce URL**
   * **Consumer Key**
   * **Consumer Secret**
5. Select **Save**. The new integration appears in the Integrations table
6. A **Test Connectivity** will trigger automatically. If you see "Connected!", everything is working. Test Connectivity also checks the 12 Agentforce data types. If all of them succeed, Agentforce turns on automatically. If any fails, Agentforce stays off and the rest of the integration keeps working
7. Select the Salesforce integration row again and under the 3-dot button, select **Collect Now** to begin the first data collection. It can take up to 24 hours, depending on the size of the environment

### Agentforce

#### Data types

Identity Intelligence collects 12 Agentforce data types: Agentforce Bots, Bot Versions, Planners, Topics, Actions, Planner Topics, Topic Actions, Topic Instructions, Flows, Users, Sessions and Conversation Logs. All 12 are required.&#x20;

#### Limits

* **Conversation log history:** Salesforce keeps conversation logs for a limited time. Identity Intelligence collects them daily from when Agentforce is turned on, so historical activity may not be available
* **API usage:** the 75% daily limit also applies to Agentforce. In a large org, Agentforce data can take several daily runs to appear
* **First collection:** up to 24 hours, as for the rest of Salesforce

### Existing integrations

If you set up Salesforce with an earlier version of this documentation, keep your run-as user and External Client App. Agentforce doesn't need a second app

1. Create the permission set from Step 2 and assign it to your existing run-as user
2. Check that the run-as user has a **Salesforce** user license, not **Salesforce Integration**

### Troubleshooting

<table><thead><tr><th width="321.37066650390625">Symptom</th><th>Fix</th></tr></thead><tbody><tr><td>Agentforce isn't detected, and every Agentforce data type fails with <code>INVALID_TYPE</code></td><td>Make sure Agentforce is enabled in the org, the run-as user has View Setup and Configuration, and the user has a <strong>Salesforce</strong> user license. After confirming this is configured correctly, re-run Test Connectivity</td></tr><tr><td>Only Agentforce Conversation Logs fails</td><td>Add Customize Application and Manage Custom Permissions to the permission set, then re-run Test Connectivity.</td></tr><tr><td>Agentforce is on, but no agents appear</td><td>If the org has no agents, this is expected: the integration connects as healthy. Otherwise, wait for the first collection; see Limits</td></tr></tbody></table>
