How to Setup External Client Apps with OAuth Client Credentials Flow

With the Summer ’24 release, Salesforce introduces “External Client Apps,” a new generation of Connected Apps designed to address previous limitations and bolster security. External Client Apps represent the future of connected apps in Salesforce, offering a more secure and streamlined method for external applications to interact with your Salesforce data.

The External Client Apps framework in Salesforce supports various OAuth flows, including:

  1. Client Credentials Flow
  2. Authorization Code and Credentials Flow
  3. Device Flow
  4. JWT Bearer Flow
  5. Token Exchange Flow

In this blog post, we’ll explore how to configure and test the OAuth Client Credentials Flow using the External Client Apps framework. The Client Credentials Flow provides a secure way for applications to access Salesforce data without direct user involvement. Here’s an outline of how this flow works:

  1. External app sends its unique client credentials (consumer key and consumer secret) to Salesforce OAuth token endpoint
  2. Salesforce verifies these credentials against the External Client App settings
  3. If valid, Salesforce returns an access token on behalf of the integration user assigned in the External Client App settings
  4. External app uses this access token to call Salesforce API
  5. Salesforce executes the API call and returns the response

Below is a pictorial representation of this flow using the Salesforce Diagramming Framework. In this guide, we will use Postman to connect to Salesforce and make API calls.

External Client Apps with OAuth Client Credentials Flow

IMPORTANT: With this flow enabled, any person or app that has access to your connected app’s consumer key and consumer secret can obtain an access token. Maintain security by periodically changing your consumer secret, and update it immediately if it becomes compromised.

Additionally, note that this flow does not support refresh tokens.

Here is a step-by-step guide on how to configure & test External Client App with OAuth Client Credentials Flow in Salesforce in just under 10-15 minutes.

NOTE: Certain sections of the guide will appear as locked in the free preview. You can download the unlocked version of the guide in PDF format by subscribing to our “All Access” Pass through the link below.

Not an “All Access” Pass Member Yet?

Get Download Access to this & 150+ More Step-by-Step Guides with “All Access” Pass. A simple and single plan to access our entire library of courses, guides, workshops & masterclasses on Salesforce.

References & Useful URLs

2 thoughts on “How to Setup External Client Apps with OAuth Client Credentials Flow”

  1. Getting this error in Postman. I created the External Client App following your guide, but still no luck.

    Error: oauth_flow_disabled, Description: The external client app or the OAuth plugin is disabled.

    1. Hi Rohit, I have faced this problem too. Can you navigate to your External Client App Setting and ensure that you see the button ‘Disable OAuth’. This will mean that the OAuth is enabled. If not, then edit the configuration and enable it again.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top
Introducing All Access Pass