Connected App
  • 13 Nov 2024
  • 3 Minutes to read
  • Dark
    Light

Connected App

  • Dark
    Light

Article summary

Create the Relay Connected App

The Connected App allows Relay Network to insert event data, occurring within the Relay Network, into your Salesforce org. Based on the Relay event type, a record will be inserted into one of the two following objects: RelayEvents__c or RelayPowerups__c.

INPORTANT

If a setting is not specifically called out in the the below article, leave it set to the default value.

  1. As an admin, login to your Salesforce org.

  2. Access your org’s Setup page.

  3. Navigate to PLATFORM TOOLS → Apps → App Manager

  4. Click the New Connected App button

rn-sfdc-new_connected_app

Figure 1.

  1. Fill out the Managed Connect App as outlined below

rn-sfdc-connected_app

Figure 2.

Basic Information (1)

  • Set Connected App Name to Relay Connected App.

  • Set API Name to Relay_Connected_App.

  • Set Contact Email to the email address that will receive and errors related to this Connected App.

API (Enable OAuth Settings)

  • Check Enable OAuth Setting (2)

  • Uncheck Enable for Device Flow

  • Because this connected app is for connecting to the Relay system, no login user interface is required. Therefore, you can set the Callback URL to https://localhost

  • Check Use Digital Signatures (3)

    • Click the Choose File button. Select the certificate file that was provided to you by your Relay Implementation Manager.

  • Move the following to the Selected OAuth Scopes (4)

    • Manage User Data via APIs (api)

    • Perform requests at any time (refresh token, offline access)

  • Check the following options (5)

    • Require Proof Key for Code Exchanges (PKCE). Extension for Supported Authorizer Flows

    • Require Secret for Web Server Flows

    • Require Secret for Refresh Token Flows

  • Click Save

  • You should receive a message that it can take up to 10 mins for changes to take effect. Click Continue.

STOP

You need to provide the Consumer Key of the Connected App to Relay.

  • Click the Manage Consumer Details button. This should open a new tab in your browser.

  • Securely provide the Consumer Key to your Relay Implementation Manager.

  • Return to the original browser tab with the Managed Connected App settings you just created.

Update the Connected App Policies

  • You should still be on the Connected App settings page, so click the Manage button. If you are not on the Relay Connected App settings page follow the below steps:

    • From setup, navigate back to PLATFORM TOOLS → Apps → App Manager

    • Locate the Relay Connected App you just created

    • Click the drown down arrow and select Manage

  • Click the Edit Policies button

    rn-sfdc-connected-app-edit-policies

    Figure 3.

Relay Connected App Policies

rn-sfdc-connected-app-policies

Figure 4.

OAuth Policies

  • Set Permitted Users to Admin approved users are pre-authorized

  • Set IP Relaxation to Relax IP Restrictions.

  • Leave all other settings at their default values.

  • Click Save to return to the Relay Connected App detail page

Relay Connected App Permission Sets

  • Locate the Permission Sets section and click the Manage Permission Sets button.

    rn-sfdc-connected-app-manage_permission_sets

    Figure 5.

Application Permission Set Assignment

rn-sfdc-connected_app-permission-set-assignment

Figure 6.

  • Locate the Relay Network Connected App permission set, you previously created in the Permission Sets article, and check it.

  • Click the Save button.

You should not have a properly configured Relay Network Connected App.

Locating Common Settings

NOTE

All of the below settings can ebe accessed from the App Manager drop-down menu.

PALTFORM TOOLS → Apps → App Manager → (Locate Relay Connected App) → Drop-down menu (located on the far right)

Setting

Location

  • Consumer Key

From the drop-down menu select ViewManage Consumer Details

  • OAuth certificate

  • OAuth Scopes

From the drop-down menu select Edit

  • Permission Set

From the drop-down menu select Manage → scroll down to the Permission Set section

Troubleshooting

The section covers common errors related to the Connected App configuration and possible root causes.

Error

Error Description

Possible Cause

invalid_client

invalid client credentials

The uploaded OAuth .crt file is incorrect. Please replace the certificate.

invalid_client_id

client identifier invalid

The consumer key is incorrect. Please verify the correct consumer key has been provided to Relay.

invalid_grant

user hasn’t approved this consumer

The provided user name does not have permissions to the connected app.

  • Verify the OAuth Policies configuration.

  • Verify the Permission Set Assignment and that the provided user is in the permission set.

  • Verify the Relay CXB Push API Configuration is using the Salesforce username value and not the email address. Note, the username often looks like an email address but it is not.

invalid_grant

refresh_token scope is required and the connected app should be installed and preauthorized.

Verify your OAuth Scopes are properly configured (Figure 2. #4).


Was this article helpful?

ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence