For the complete documentation index, see llms.txt. This page is also available as Markdown.

Ingest logs and data from Salesforce

Ingest Salesforce logs and data into Cortex Cloud.

Cortex Cloud supports the collection of Salesforce near-real-time (NRT) events, Setup Audit Trail, Content Metadata, Accounts, event log files, and snapshots. This integration improves threat detection accuracy and eliminates duplicate alerts by ensuring critical multi-event alerts are captured in near-real-time rather than relying on hourly or daily log files.

Collection methods

The Salesforce data collector utilizes two primary methods for data ingestion:

  • Streaming (Default): Collects Salesforce near "Real-Time Events" via streaming or SOQL queries. Events are generated in near-real-time and collected every minute.

    • Dataset: salesforce_realtime_raw

  • Batch (Legacy): Collects Salesforce EventLogFiles. Files are generated every hour or 24 hours and collected by Cortex Cloud every 30 seconds.

    • Dataset: salesforce_eventlogfiles_raw

Note

Both methods collect the Setup Audit Trail from Salesforce.

Important

Existing customers keep in mind: Changing your collection method updates the log schema, which will impact existing correlation rules. While it is strongly recommended to use NRT security logs for improved detection, you can keep both methods enabled in parallel during a transition period to ensure continuous protection while you update your rules.

Supported data types

Cortex Cloud collects various data types from Salesforce. Use the table below to understand what is collected and where to find more information.

Data Category
Included Objects / Description
More Information

Real-time events

High-speed security events (such as ApiEvent, ReportAnomalyEvent).

For more information, see Real-Time Event Monitoring Objects.

Setup Audit Trail

Tracks recent configuration changes made by administrators.

For more information, see SetupAuditTrail.

Event log files

Legacy batch logs generated hourly or daily.

For more information, see EventLogFile.

Content metadata

"Document", "ContentFolder", "Attachment", "ContentDistribution"

For more information, see Salesforce Objects.

Accounts

Account objects

For more information, see Salesforce Objects.

Snapshots

ConnectedApplication, PermissionSet, Profile, Group, GroupMember, User, UserRole, TenantSecurityLogin, TenantSecurityUserPerm, UserAccountTeamMember

For more information, see Salesforce Objects.

Prerequisite

How to configure the Salesforce data source

Perform the following procedures in the order that they appear, below.

Task 1. Configure Salesforce External Client App

Salesforce is deprecating "Connected Apps"; it is recommended to use an External Client App.

  1. In Salesforce on the Setup page, search for App Manager and click New External Client App.

  2. Provide a name (such as panw_cortex_integration), and your email address (used to retrieve the Consumer Key and Consumer Secret).

  3. Under API (enable OAuth settings), select Enable OAuth.

  4. Enter the following Callback URLs on separate lines (replacing {tenant external URL} with your tenant name):

    • https://login.salesforce.com/services/oauth2/callback

    • https://{tenant external URL}.paloaltonetworks.com/configuration/data-sources

  5. Select these OAuth Scopes: Manage user data via APIs (api) and Perform requests at any time (refresh_token, offline_access).

  6. Enable only these checkboxes after OAuth Scopes: Require Secret for Web Server Flow, Require Secret for Refresh Token Flow, and Enable Client Credentials Flow. For more information, see Salesforce Client Credentials Flow.

  7. Click Save, then Continue.

Task 2. Retrieve credentials

Consumer Key will be used for client_id, and Consumer Secret will be used for client_secret in OAuth 2.0.

  1. On the Setup page, search for External Client App Manager.

  2. Find your application (the one that you defined for Cortex XSIAM), click the arrow button in the last column, and select Edit Settings.

  3. In the OAuth Settings area, click Consumer Key and Secret.

  4. Go back to the Salesforce Verify Your Identity page, paste the code received via email in the Verification Code box, and click Verify. One of the following will happen:

    • The Consumer Key and Consumer Secret will be sent to the email address that you configured earlier for the Cortex XSIAM External Client App.

    • On the Salesforce External Client App Name page, the Consumer Details area will display the Consumer Key and Consumer Secret, and you will be able to copy them from here when required in the following procedures.

Task 3. Configure the refresh token expiration policy
  1. On the Setup page, search for External Client App Manager.

  2. Find your application (the one that you defined for Cortex XSIAM), click the arrow button in the last column, and select Edit Policies.

  3. In the OAuth Policies area:

    • Under Plugin Policies - Permitted Users, select All users can self-authorize.

    • Set the refresh token policy to Expire refresh token if not used for specific time (recommended). For example, select this option and set it for 7 days.

Task 4. Configure OAuth 2.0

Configure the OAuth 2.0 application to call the Salesforce API using client_id (Consumer Key) and client_secret (Consumer Secret). For more information, see Configure an External Client App OAuth 2.0 Client Credentials Flow.

Task 5. Configure Cortex Cloud
  1. In Cortex XSIAM, create a Salesforce data collector instance:

    1. Navigate to SettingsData Sources & Integrations.

    2. On the Data Sources & Integrations page, click Add Data Source, search for and select Salesforce, and click Connect.

  2. Enter a unique Name for the instance, the Salesforce Domain Name, and the Consumer Key (client_id) and the Consumer Secret (client_secret) credentials obtained earlier in this workflow. For example, the domain could be the API URL from which logs are received, such as https://MyDomainName.my.salesforce.com/services/data/vXX.X/resource/.

  3. (Optional) Clear unwanted data types (Content metadata (default), Accounts, and Event Log Files). When these options are cleared, only these data types will be omitted from collection. All other data will be collected as usual.\

    Selecting Event Log Files enables Batch mode instead of near-real-time.

  4. Click Enable.

    A popup which redirects you to your Salesforce instance appears, to get OAuth 2.0 authorization credentials and access.

  5. Click OK.

    In Salesforce, a new tab appears.

  6. Enter your username and password, and Log In.

  7. When you are asked to allow access, select Allow.

    A Salesforce data collection instance is created, and an authorization token is created and returned to Cortex XSIAM. Data collection begins.

Task 6. (Optional) Edit or test existing Salesforce collector settings

You can edit and test an existing collector instance after a successful initial connection between Salesforce and Cortex XSIAM. Do this by right-clicking and selecting Edit for the collector instance. The log collection window will be displayed, where you can make changes or test, by clicking Test.

Important

Troubleshooting

If the authorization token is not created and sent to Cortex Cloud after the 15-minute timeout period, an authorization failure error will be returned. To retry:

  1. In Cortex Cloud, right click the collector instance and select Edit.

  2. The log collection window will display again, allowing you to edit settings and retry getting the authorization code.

Last updated

Was this helpful?