Setting Up Modern OAuth Connections for Salesforce

29 October 2024
KingswaySoft Team

OAuth is a modern application authentication and authorization infrastructure that provides secure access to your application data. This is achieved through various mechanisms, one of which involves generating an access token. The token-based authentication is more secure than sharing user credentials directly with an application. A compromised token can be revoked at any time, and a new one can be created. Users can each have their own token with different access levels for each user. Another major benefit from an administration perspective is that, instead of keeping track of credentials, you can send the token file directly while providing the token password through a separate secure communication if needed.

Setting up an OAuth connection can be an involved process, as numerous steps that can be slightly confusing if you have not worked with the concept before. This blog post will walk you through the process of creating a Salesforce app for OAuth, obtaining any necessary information, and setting up a Salesforce Connection Manager to connect to your Salesforce application for integration purposes.

Note: This blog post highlights the critical transition away from legacy Salesforce authentication, specifically the SOAP API login() method and the retirement of legacy Connected Apps. To maintain secure and uninterrupted data synchronization, it is essential to move toward modern OAuth2.0 authentication as soon as possible by implementing External Client Apps as recommended by Salesforce. External Client Apps (ECA) securely connect integrations to Salesforce using standardized protocols like OAuth and SAML. If you had previously configured the Salesforce connection manager using legacy basic authentication, your connection will immediately fail when you upgrade to our recent 2026 release wave 1 (v26.1), it will throw the below error.

System.Web.Services.Protocols.SoapException: INVALID_OPERATION:The SOAP Login operation is not available in the API version specified (66.0).

If you continue to use an earlier release of our software (v25.2 or before), you will have some additional time until 2027 to update your integration connection. However, the clock is clicking, it is important to make the changes the sooner the better. The good news is, our Salesforce integration components support modern OAuth authentication in both SOAP and REST connections, there is no additional effort required in your SSIS packages, otherwise simply changing the connection to use the new OAuth option. 

There are two kinds of OAuth client apps that you can create within Salesforce:

  • External Client App (also referred to as ECA)
  • Connected App - This has been deprecated, but it might still be available in your Salesforce instance

In the sections below, we will talk about both options, but you should always go for the External Client App option if you can. 

Creating Salesforce External Client App

  1. Login to your Salesforce instance, and search in "Quick Find" for External Client App Manager.

    Search for ECA

  2. In the External Client App Manager page, click on "New External Client App". This is where you would create the new ECA credentials and other settings associated with it.

    Create New ECA

  3. In the Setup page, under the Settings Tab, you can fill in the basic information such as the External Client App Name, API Name, Contact Email, etc. There is also optional information that you could provide as required.

    ECA Basic info

  4. Prior to the Settings tab, there is a Policies tab, in which you can choose your Start Page. In our case, for OAuth authentication, you would choose OAuth. And under OAuth Policies, provide the Permitted Users from the drop down, along with the OAuth Start URL (which would generally be the authorization URL).

    ECA OAUth Policies

  5. Back in Settings tab, under OAuth Settings section, check 'Enable OAuth". And then under App Settings, define the Callback URL. The Callback URL (or Redirect URL) would be generally a generic/standalone HTTP(s) URL that you would provide in OAuth flow to receive the issued access authorization code. The general recommendation of the URL is that it should be a URL that you can trust since it will receive the authorization code when the authentication process is completed, and you want to ensure the URL does not perform any redirection on its own when reached, as doing so the authorization code will likely get lost after the redirection. In addition to the redirect URL option, you need to specify the required Scopes accordingly, as shown below.

    ECA OAuth and Permissions

  6. Under the Flow Enablement section, check the option "Enable Authorization Code and Credentials Flow". And for Security section, you can enable PKCE (Proof Key for Code Exchange) option for enhanced security, if it is desired as per your security standard.

    ECA PKCE and Authorization code flow

  7. As an important note, at this point, in order to verify if PKCE is required in your Organization level, OR if you wish to enable it, you can navigate to "OAuth and OpenID Connect Settings" from the Quick Find search, and either verify or enable/disable the options.

    ECA PKCE Org Level

  8. Back in the External Client App page, now that you are done with the ECA setup, you can click on "Consumer Key and Secret" under App Settings.

    ECA Consumer Key and Secret

  9. This will open a new window and show the Key and Secret which you can copy. This is what you would be using as Client ID and Client Secret, respectively, in our SSIS Salesforce connection manager later on.

    ECA Key Gen

Creating Salesforce Connected App (Deprecated)

  1. Log in to your Salesforce account and search for your App Manager in the Quick Find Box.

    Salesforce App Manager

  2. In the App Manager, click on the “New Connected App” button.

    New Connected App

  3. Give your app a name and a contact email. The name will be displayed in the App Manager. Please ensure that the name is unique within your organization.

    App Setup

  4. Next, under the API Tab, check the Enable OAuth Settings. Make sure that you enter a callback URL. The callback URL is the same as the OAuth redirect URI. The callback URL is the URL to which the user is redirected after successful authorization. You can provide any valid HTTPS URL; however, ensure it is a URL without redirects.

    OAuth Settings

  5. After this, you need to select the OAuth scopes to apply for the app. You can do this by selecting the available OAuth scopes and adding them to the right side. Make sure you are adding the appropriate OAuth scopes, as the OAuth scopes define the permissions that are granted for the app. In this example, we have given “Full access” and "Perform requests on your behalf at any time" scopes. The "Perform requests on your behalf at any time" scope is used to get a refresh token. The refresh token will help refresh your access automatically, so you don't have to re-authenticate every time.

  6. Lastly, click Save. You have successfully created your Salesforce app.
  1. To get your client credentials, you need to go back to your App Manager. You can then go to the App that you just created. Click on the drop-down menu and select " View".

    View App

  2. This will allow you to open the app and view all its settings and configurations.

    OAuth Information

    It will show the Scopes that you have given the app and the Callback URL. 

  3. Next, press the Manage Consumer Details; it will take you to another page showing the Consumer Key and Secret. You may be required to validate your identity. Salesforce will send a verification code to your email.

Consumer Details

Configuring Salesforce Connection Manager In SSIS

After creating either of the app above, you may now head to your SSIS development environment to create your Salesforce Connection.

Our Salesforce Connection Manager supports both SOAP and REST Service Endpoints to connect with the Salesforce API using OAuth. However, in this example, we will be using REST. You will then need to provide the Instance Type. There are three options available:

  • Production
  • Sandbox
  • Other: this Instance Type would be used when the Service URL we generate in the Service URL window does not fully match the instance you want to connect to. In this case, the field is unlocked for editing.

Connection Manager

Finally, we will set the authentication type to AuthorizationCode.

You will then click "Get New Token" and enter the details from the previous steps to authorize and generate the token.

Since we created a Salesforce App earlier in the blog post, we will use the option My Own App. The KingswaySoft App is a publicly shared app that we provide for testing purposes; we don't generally recommend using our shared app for production use.

Generate Token

  • Client ID: You can find the client ID in step 9 as the Consumer Key.
  • Client Secret: You can find the Client Secret in step 9 as the Consumer Secret.
  • Redirect URl: The URI was provided in step 4 as the Callback URL.

Please note that your Salesforce Administrator has enabled the Require Proof Key for Code Exchange (PKCE) Extension on an Org-wide level, or you can select the Require Proof Key for Code Exchange (PKCE) extension when creating the Salesforce app.

After clicking OK, you will be prompted to log into your Salesforce account, which will then redirect you to your redirect URL. The URL will contain a code. You need to copy the entire URL and paste it into the component.

Redirect Code

Finally, you will be prompted to set a password for the token file before it is saved. After this, the process will be completed. You can test the connection using the "Test Connection" button to verify if you can access the instance. Press OK to save the configuration you have created.

In addition to the Authorization Code authentication option, we also support the following additional OAuth authentication options. 

  • Client Credentials with Certificate
  • Client Credentials (Server-to-Server Authentication
  • Client Credentials with Username and Password

The use of those options is covered in our online help manual page

Closing Notes

We hope this has been helpful. In this blog post, we have covered the setup for the app required in Salesforce, along with obtaining your client ID, client secret, and generating the token file in the Salesforce Connection Manager. We have also explained how OAuth works and the benefits of using it as an authentication method over legacy authentication. In this blog post, our focus was on the Authorization Code authentication type for OAuth; however, our component also supports the Certificate OAuth type. You can take a look at our help manual for more information.

Archive

April 2026 3 March 2026 2 February 2026 2 January 2026 2 December 2025 2 November 2025 2 October 2025 2 September 2025 2 August 2025 2 July 2025 2 June 2025 1 May 2025 2 April 2025 3 March 2025 1 February 2025 1 January 2025 2 December 2024 1 November 2024 3 October 2024 1 September 2024 1 August 2024 2 July 2024 1 June 2024 1 May 2024 1 April 2024 2 March 2024 2 February 2024 2 January 2024 2 December 2023 1 November 2023 1 October 2023 2 August 2023 1 July 2023 2 June 2023 1 May 2023 2 April 2023 1 March 2023 1 February 2023 1 January 2023 2 December 2022 1 November 2022 2 October 2022 2 September 2022 2 August 2022 2 July 2022 3 June 2022 2 May 2022 2 April 2022 3 March 2022 2 February 2022 1 January 2022 2 December 2021 1 October 2021 1 September 2021 2 August 2021 2 July 2021 2 June 2021 1 May 2021 1 April 2021 2 March 2021 2 February 2021 2 January 2021 2 December 2020 2 November 2020 4 October 2020 1 September 2020 3 August 2020 2 July 2020 1 June 2020 2 May 2020 1 April 2020 1 March 2020 1 February 2020 1 January 2020 1 December 2019 1 November 2019 1 October 2019 1 May 2019 1 February 2019 1 December 2018 2 November 2018 1 October 2018 4 September 2018 1 August 2018 1 July 2018 1 June 2018 3 April 2018 3 March 2018 3 February 2018 3 January 2018 2 December 2017 1 April 2017 1 March 2017 7 December 2016 1 November 2016 2 October 2016 1 September 2016 4 August 2016 1 June 2016 1 May 2016 3 April 2016 1 August 2015 1 April 2015 10 August 2014 1 July 2014 1 June 2014 2 May 2014 2 February 2014 1 January 2014 2 October 2013 1 September 2013 2 August 2013 2 June 2013 5 May 2013 2 March 2013 1 February 2013 1 January 2013 1 December 2012 2 November 2012 2 September 2012 2 July 2012 1 May 2012 3 April 2012 2 March 2012 2 January 2012 1

Tags