Setting up a Salesforce OAuth Connection

Published: Aug 19, 2024

Setting up a Salesforce OAuth Connection

Published: Aug 19, 2024

Salesforce connections can be configured using OAuth. A single connector can be used to connect to both a Sandbox and Production Instance.

Setup in Salesforce

Before adding the Salesforce connector, we need to create the Connected app in Salesforce.

Find Salesforce Instance

  1. Log into the Salesforce environment as the user.
  2. Open Setup and search for Company Information.
  3. Locate the Instance value and save it for later.

Create a Connected App in Salesforce

  1. Log into the Salesforce environment as the user.
  2. Open Setup and search for App Manager.
  3. Select New Connected App.

Connected Apps are unique for each environment/sandbox.

  1. Connect App Name – Friendly name for the app.
  2. Contact Email – Email address for app issues.
  3. Enable OAuth Settings – Box must be selected.
  4. Callback URL – Enter the correct URL based on deployment/region.
    1. In SmartConnect.com navigate to Connections > Create Connection > Salesforce.
    2.  Check the box for Use OAuth and copy the redirect URL displayed in the connection window.
  1. Selected OAuth Scopes – Choose these 5 scopes.
    • Access the identity URL service (id, profile, email, address, phone)
    • Manage user data via APIs (api)
    • Manage user data via Web browsers (web)
    • Perform requests at any time (refresh_token, offline_access)
    • Access custom permissions (custom_permissions)
  1. Click Save on Connected App.
  2. When in the Connected App, click Manage Consumer Details.
  1. On the next screen save the Consumer Key and Consumer Secret for use later.

Setting up the connector in SmartConnect

  1. Login to login.smartconnect.com.
  2. Navigate to Connections > Create Connection button (or edit an existing Salesforce connection).
  3. Select Salesforce.
  4. Sandbox/Production – Use tabs to configure Sandbox and Production connections in a single connector.
  5. Description – Friendly name for the connection.
  6. Create Tests – If selected, SmartConnect will create the necessary apex tests to promote your sandbox objects to production.
  7. Use OAuth – Check this box for OAuth authentication.
  8. Service URL – URL for the Salesforce Soap webservices.
    • Format as: https://<instance>.salesforce.com/services/oauth2 where the instance is found at the start of this article.
  9. Organization Name – Read-only name of Organization (Populated after click Validate).
  10. Organization Type – Read-only Type of Organization (Populated after click Validate).
  11. OAuth Details
    • Client Id – Consumer Key from Salesforce Setup.
    • Client Secret – Consumer Secret from Salesforce Setup.
  12. Reset All Test Mappings – Reset all configured Test Class mappings to their default values.
  1. Click Validate and Allow the prompt for access.
  1. Save the Connector.
Content
Setup in Salesforce Find Salesforce Instance Create a Connected App in Salesforce Setting up the connector in SmartConnect

Feeling stuck? Get the support and guidance you need to help you power through any data challenge

Reset Filters