Skip to content

Configure your Salesforce account to collect data

To collect data from Salesforce, create a Salesforce account with the following permissions:

  • (Optional) A security token created for the account to access the Salesforce Rest API. For instructions on how to create a security token, see Reset your security token. Note that a security token is not required if your machine IP is within the Salesforce trusted ip range.

  • (Optional) You need a Salesforce App if you want to use OAuth authentication. When you add an account in the Splunk Add-on for Salesforce and you choose OAuth 2.0 Client Credentials as your authentication type.

  • To collect Salesforce object data, you have to have read access to the Salesforce objects you want to get data from.

  • To collect Salesforce event log data, you have to have read access to the Salesforce event log and enable the Salesforce event log file API. For any questions about this API, contact your Salesforce admin or Salesforce sales representative.

Set up the OAuth App in the Salesforce

  1. Login to Salesforce with the same user credentials that you want to collect data in your Splunk deployment.
  2. Navigate to App Manager:
    • From Setup (gear wheel icon), in the Quick Find box, enter “App Manager” , then select “App Manager”.
  3. Create a New Connected App:

    • Click “New Connected App”.
    • Enter the required details:
    • App Name: This will appear in the App Manager and on its App Launcher tile.
    • API Name: Defaults to a version of the name without spaces. Only letters, numbers, and underscores are allowed. Edit as necessary.
    • Contact Email: Provide a valid email address for Salesforce communication.
  4. Enable OAuth Settings:

    • In the API (Enable OAuth Settings) section:
    • Check Enable OAuth Settings.
    • Define a Callback URL (any valid HTTPS address; this is mandatory but not used in the Client Credentials flow).
    • Move all available OAuth scopes to Selected OAuth Scopes.
    • Check Enable Client Credentials Flow.
  5. Save the Connected App:

    • Click Save. It may take approximately 10 minutes for the changes to take effect.
  6. Manage Consumer Details:

    • Once the app is created, go to the API (Enable OAuth Settings) section of the app details.
    • Click Manage Consumer Details.
    • You will need to provide a verification code sent to your email address.
    • Save the Consumer Key and Consumer Secret. These are necessary for authentication.
  7. Configure Client Credentials Policies:

    • Go to Apps > Connected Apps > Manage Connected Apps.
    • Locate your newly created app and click Manage.
    • Under Edit Policies:
    • In the Client Credentials Flow section, set the Run As field to the desired user.
    • Save the changes.

Your Salesforce app is now configured to use the OAuth Client Credentials flow. You can use the Consumer Key and Consumer Secret to authenticate your integration.