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.

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.

References & Useful URLs



Liked what you learned? Let me know in the comments below 👇