How to Enable and Test External Credentials in Salesforce

Table of Contents

Salesforce’s new External Credentials model is a critical part of integration security moving forward, especially after the changes rolled out in Salesforce Summer ’25.  

Instead of embedding sensitive tokens or hardcoding values in Apex, you can now securely authorize callouts using External Credentials, Principals, and Named Credentials, with better control and auditing. 

In this guide, we’ll walk you through the step-by-step setup of External Credentials and Named Credentials with No Authentication and test the integration using the Developer Console.  

This is ideal for devs and architects who want secure, flexible callouts to external APIs usingSalesforce’s updated integration security model.

Step-by-Step Guide to Set Up External Credentials in Salesforce

Step 1: Create a New External Credential 

  1. Go to Setup 
  2. In the Quick Find box, search for Named Credentials 
  3. Click on the External Credentials tab 
  4. Click “New” 

Now fill out the form: 

  • Label: (Enter a descriptive label, e.g., NewEC) 
  • Name: (Auto-filled or enter as desired, e.g, NewEC) 
  • Authentication Protocol: Select No Authentication 

Click Save

 Step 2: Add a Principal to the External Credential 

Once saved, scroll down to the Principals related list: 

  1. Click “New.” 
  2. Add parameter name. Say, for instance, NewECPrincipal. 
  3. Click Save

Step 3: Create a New Named Credential 

  1. Go back to Named Credentials tab in the same setup screen 
  2. Click “New.” 
  3. Fill in the fields: 
  • Label: (e.g., NewNC) 
  • Name: (e.g., NewNC
  • URL: Enter your API endpoint.  
  • Click the checkbox for Enable for Callouts 
  • Under Authentication, select the External Credential you just created 

Click Save 

 Step 4: Enable Principal Access for Your Profile 

  1. Go to Setup → Profiles 
  2. Select the profile of the user making the callout, say System Administrator 
  3. Scroll down and click on “Enabled External Credential Principal Access.” 
  4. Click Edit 
  5. In the Available list, locate the External Credential → Principal pair you created 
  6. Move it to the Enabled list 
  7. Click Save 

This allows the user profile to use the Named Credential. 

 Step 5: Test the Named Credential in Developer Console 

  1. Go to the Developer Console 
  2. Open Debug → Open Execute Anonymous Window 
  3. Paste the following code: 

HttpRequest req = new HttpRequest();
    req.setEndpoint(‘callout:New_NC’); // Named Credential
    req.setMethod(‘GET’);
    Http http = new Http();
    HttpResponse res = http.send(req); 

System.debug(res.getStatusCode()); 

Note: Replace ‘Your_Named_Credential_Name’ with the actual Name (not Label) of the Named Credential you created. 

  1. Run the code 
  2. Go to Debug Logs → View Last Log 

Congratulations! Everything is configured properly. You’ll now see a response from the external API.

What’s there in Salesforce Summer ’25 Changes 

The Salesforce Summer ’25 features introduced more secure, granular controls for integrations via External Credentials and Principal Mapping. It’s now considered best practice over storing tokens in custom metadata or code. 

External Credentials in Salesforce let you manage integrations with different auth methods (including “No Authentication”) while ensuring you only expose access to trusted profiles or permission sets. 

Conclusion 

This guide shows you exactly how to set up and test External Credentials and Named Credentials in Salesforce the right way using the updated Summer ’25 features. It’s a cleaner, safer way to manage integrations and avoids the mess of hardcoded tokens. 

Want to customize this solution for your org? Or need help implementing it across multiple integrations?
Reach out today, and let’s get it done right!

Tags: #External Credentials in Salesforce, #Salesforce Summer ’25 features

Featured Reads

Colors, Conversations, and Connections: How Synexc Celebrated Friendship Day with Heart

“Friendship is the golden thread that ties the heart of

What Really Shapes Company Culture: Performance Review or Fun Fridays?

The culture in corporate usually associates itself with big moments,

Custom App on Salesforce AppExchange

Top Benefits of Building a Custom App on Salesforce AppExchange

Table of Contents Why More Teams Are Building Custom AppExchange

Salesforce AppExchange Development Services: What You Need to Know and How to choose the right partner

Explore the full process of custom Salesforce app development for

Salesforce Winter '26 Release

Salesforce Winter ’26 Release: Key Enhancements To Watch

Table Of Contents Key Enhancements Coming in Winter ’26 Enforced

Salesforce Consulting Services: How to Find the Right Consultants on AppExchange

Finding the right Salesforce consultant on AppExchange starts with asking

Why Hiring a Salesforce CRM Implementation Consultant Is Critical to Your CRM Success

Hiring a Salesforce CRM implementation consultant ensures you avoid costly

Salesforce Integration Services: Choosing the Right CTI and Cloud Integration Partner

A guide to choosing the right partner for Salesforce CTI

Salesforce’s Agentforce 3: The First AI Agent Platform Ready for Enterprise Scale

On June 24, 2025, Salesforce introduced Agentforce 3, an enterprise-scale

Salesforce Brings AI Agents for Field Service: Why It’s a Bigger Deal Than It Looks

When Salesforce announced it was bringing Agentic AI to Field

IT Staff Augmentation Services: The Smarter Way to Scale Tech Teams

IT Staff augmentation isn’t just about filling gaps; it’s about

Prompt Builder vs Apex in Salesforce

Prompt Builder vs Apex in Salesforce Summer ’25: What to Use for AI Automation

Table Of Contents Prompt Builder in Summer ’25: What’s New

How to Enable and Test External Credentials in Salesforce

Salesforce’s new External Credentials model is a critical part of

How to Auto-Generate Meeting Summaries Natively in Salesforce with Apex and Flow

Meetings are important, but what’s even more important is what

Want More Than Just Reading?

Talk to our consultants about how we can 
implement what you just read.