Salesforce Authentication using OAuth
The Salesforce platform implements the OAuth 2.0 Authorization Framework, so users can authorize applications to access Force.com resources. When configuring ARM and Salesforce source, you must know the Client_ID and Client_Secret token values for the Salesforce organization you want to index.
Important Points to Consider:
The following article is
applicable for: self-hosted and dedicated hosted users
not applicable for: shared cloud users
For share cloud customers, ARM has a pre-configured connected app via salesforce; therefore, client_id and client_secret fields are not exposed in the user interface. For more information, please refer to the link: Adding a Salesforce Org connection via OAuth
To get the Salesforce Client_ID and Client_Secret values
Log in to Salesforce as an administrator.
In the drop-down list of the account (in the upper-right corner), select
Setup
.In the navigation menu on the left, under
App Setup
, expandCreate
, then clickApps
.On the
Connected Apps
page, click theNew
button.On the
New Connected App
page, fill in the following required fields underBasic Information
:Enter meaningful names in the Connected App Name and API Name boxes.
Enter your email in the Contact Email box to receive messages from this application.
Go to
API (Enable OAuth Settings)
, and selectEnable OAuth Settings
.In the
Callback URL
field, enter https://<ARM access URL>/oauth/_callbackFor example, https://preview.autorabit.com/oauth/_callback Depending on which OAuth flow you use, this is typically the URL that a user’s browser is redirected to after successful authentication.In the Available OAuth Scopes list, select the following items:
Access and manage your data (API)
Full access (full)
Perform requests on your behalf at any time (refresh_token, offline_access)
and click Add for each to appear in the Selected OAuth Scopes list.
Click the
Save
button to save the newConnected App
.In the
Connected Apps
list, find theApp
you just created and clickManage
.On the page that opens, click the
Edit
button.Under
OAuth policies
, selectAll users may self-authorize
in thePermitted Users
list, then click theSave
button.
Return to the
Connected Apps
list, and click the app you created.In the page that appears for your new connected app, in the
API (Enable OAuth Settings)
section:Copy the
Consumer Key
value and paste it into a secure reference document of your choice. The Consumer Key is the client_id.Next to
Consumer secret
, clickClick to reveal
, copy the value that appears, and paste it into your secure reference document. The Consumer secret is the client_secret.
Open the oauth.properties file in the .rabit/org/oauth.properties directory and update the client_id and client_secret token during on-premise installation.
FAQ:
Why am I unable to register my Salesforce Org using an OAuth connection?
Verify in the user Salesforce Org if the AutoRABIT Connected App is “Blocked” and unblock it.
Verify in user Salesforce Org if there are any specific permissions set for the Connected App.
Verify whether the redirect URL, client ID, and the secret key in oauth.properties file (path: .rabit/org/oauth.properties) are valid.
If the user is on a proxy-enabled server and receives an error such as "Username may not be null", the proxy credentials must be validated. If the proxy username is set to "null", the above error will occur.
Last updated
Was this helpful?