Setting up Salesforce OAuth

In order to use the Salesforce SOQL plug-in, you will need to login to the Salesforce browser interface and setup an OAuth connection. This article summarizes the key steps. Detailed instructions can be found in the Salesforce support area. (See Creating a Connected App.)

Note: The 'regular' Salesforce plugin does not require an OAuth connection. You can set up a connection using that plugin simply by inputting your Salesforce username and password, plus your 'security token' (which is essentially an extra password, obtainable from the Salesforce browser interface).

1. Login to Salesforce

Login to Salesforce
  1. Go to the "Setup" menu:

2. Use APP Setup Section in Left Sidebar

  1. Choose "Apps" in the Create Apps sub-section of App Setup
  2. Click the "New" button in the Connected Apps section

3. Provide a name for your new app

4. Enable OAuth Settings

  1. Check 'Enable OAuth Settings'
  2. Provide a Callback URL in this form where 'example.metricinsights.com' is the hostname for your Metric Insights server
  3. Selected OAuth Scopes should include 'Access and manage your data (API)' and 'Perform requests on your behalf at any time (refresh_token, offline_access)'.
  4. Click 'Save'

5. Find your new app in the list of Connected Apps and click it's name

 Find your new app in the list of Connected Apps and click it's name

You should see your Consumer Key (ID) and your Consumer Secret in the middle of the page.

6. Client ID and Client Secret

Client ID and Client Secret

You should see your Consumer Key (ID) and your Consumer Secret in the middle of the page.. You need to add your SalesForce Secret and Client ID to the Config variables - see here for details

('SALESFORCE_OAUTH2_CLIENT_ID', '3MVxxxxxC92_J.LmfhKJ0Z_...5JydLTMG5bh6eosdfWExxxbc_2FWeBclda5gD6');

('SALESFORCE_OAUTH2_CLIENT_SECRET', 'nnnnnn..');

Note: These are client specific.

7. Enable Metric Insights to Refresh Your Token

In the API (Enable OAuth Settings) section:

  1. Add "Perform requests on your behalf at any time (refresh_token, offline_access)" to Selected OAuth Scopes.
  2. Save

0 Comments

Add your comment

E-Mail me when someone replies to this comment