Applies to Riva Insight On-Premise Server when using Login with Salesforce.
Issue
Upon loading Riva Insight in Outlook, any of the following error messages may appear:
HTTP_STATUS_BAD_REQUEST
400 Bad Request
Unable to connect to Riva Insight
Potential Causes
- When using Login with Salesforce, there may be incorrect Client ID, Client Secret, or callback URL values defined.
- When using a sandbox, or a custom domain, there may be an incorrect value for CustomDomainAuthUrl in the \Insight\webConnectionStrings file.
Solution
To verify the app's callback URL:
-
In Salesforce, as an admin, navigate to Setup. In the Quick Find box, search for App Manager. Locate the app used to connect Insight, then select View from the drop-down list on the right. This will bring you to Manage Connected Apps.
-
Select the Manage Consumer Details button, which will open a new window. Enter your Salesforce administrator account credentials if required.
-
Copy the Consumer Key (Client ID) and Consumer Secret (Client Secret) into a secure location.
-
Under API (Enable OAuth Settings), check the Callback URL. Ensure that it is present and spelled correctly, with lowercase letters only.
-
If necessary, click Edit to enter the correct Callback URL.
Example: https://{servername}/{insightappname}/salesforce-oauth
https://insight.mycorp.com/insight/salesforce-oauth -
On the Riva Insight Server, check that the \Insight\webConnectionStrings.config file has the correct credentials in the following format:
<add name="Insight.Auth.Salesforce.Oauth" connectionString="Key=YOUR-KEY-HERE;Secret=YOUR-SECRET-HERE;CallBackUrl=#InsightURL#/salesforce-oauth;CustomDomainAuthUrl=https://login.salesforce.com"/>
Compare the Key and Secret values here to those copied from Manage Consumer Details in Salesforce, and update them if necessary.Note: There is no need to change #InsightURL#, because it is dynamically set.
- If you are using a sandbox, update CustomDomainAuthUrl to https://test.salesforce.com;
- If you are using a custom domain, update CustomDomainAuthUrl to the correct URL for that domain.
https://{mydomainname}.my.salesforce.com or
https://{mydomainname}.my.site.com/{communitysite}/login
To ensure you have the correct login url:
- Add ".well-known/auth-configuration" to the end of your Salesforce url. For example:
- https://{mydomainname}.my.salesforce.com.well-known/auth-configuration or
- https://{mydomainname}.my.site.com/{mycommunitysite}/.well-known/auth-configuration
- Find "LoginPageUrl" on the page that is displayed, and update your "CustomDomainAuthUrl" with the value exactly as provided.
- Refer to Salesforce Auth Configuration Endpoint for more information