---
schema_version: "1"
id: c8ee124437e0531279397b46ab426e57fd2e0e1b499819de99aaf9f5365139f3
title: Create Named Credentials and External Credentials
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/nc_named_creds_and_ext_creds.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.nc_named_creds_and_ext_creds.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f9307636ed34d8ba008c3e3f27fe0ce87a54caa8e644038beea402d4259d33b4
description: To simplify the setup of authenticated callouts, create an external credential to specify an authentication protocol and then specify a named credential as the callout endpoint. Add custom headers to cover more use cases and security requirements. Use a permission set or profile to grant access so that users can make authenticated callouts. You can create and configure named credentials programmatically or through the Salesforce UI.
products:
  - Security
release: "264"
---
# Create Named Credentials and External Credentials

To simplify the setup of authenticated callouts, create an external credential to specify an authentication protocol and then specify a named credential as the callout endpoint. Add custom headers to cover more use cases and security requirements. Use a permission set or profile to grant access so that users can make authenticated callouts. You can create and configure named credentials programmatically or through the Salesforce UI.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: all editions</td></tr></tbody></table>

To create a named credential, follow these steps. To see end-to-end examples of named credential configurations for callouts to various external systems, see [Named Credential Example Configurations](https://help.salesforce.com/s/articleView?id=xcloud.nc_example_configurations.htm&release=264.0.0&type=5 "Explore scenarios for configuring named credentials to make callouts to various external systems. The examples cover the entire named credential configuration for different authentication protocols and principal types.").

1. **[Create or Edit an External Auth Identity Provider](https://help.salesforce.com/s/articleView?id=xcloud.nc_create_edit_external_auth_identity_provider.htm&release=264.0.0&type=5)**  
    If you plan to create named and external credentials that use OAuth2.0 authentication, first create an external auth identity provider. External auth identity providers obtain OAuth tokens for outbound callouts to external systems.
2. **[Create or Edit an External Credential](https://help.salesforce.com/s/articleView?id=xcloud.nc_create_edit_external_credential.htm&release=264.0.0&type=5)**  
    To use named credentials, you must first configure an external credential. The external credential represents the details of how Salesforce authenticates to an external system via an authentication protocol.
3. **[Set Up JWT Claims for External Credentials](https://help.salesforce.com/s/articleView?id=xcloud.nc_jwt_claims.htm&release=264.0.0&type=5)**  
    If your external credential uses JWT authentication, configure JWT (JSON Web Token) claims.
4. **[Use Custom Headers with Credentials](https://help.salesforce.com/s/articleView?id=xcloud.nc_cred_custom_headers.htm&release=264.0.0&type=5)**  
    Add custom headers to external credentials to cover more use cases and security requirements. With custom headers, you can set your own parameters for authentication.
5. **[Create or Edit a Named Credential](https://help.salesforce.com/s/articleView?id=xcloud.nc_create_edit_named_credential.htm&release=264.0.0&type=5)**  
    Configure a named credential to specify the URL of a callout endpoint. To specify the required authentication parameters for the callout, connect the named credential to an external credential.
6. **[Enable External Credential Principals](https://help.salesforce.com/s/articleView?id=xcloud.nc_enable_ext_cred_principal.htm&release=264.0.0&type=5)**  
    Principals link an external credential to permission sets or user profiles so that users can make callouts using the named credential. At run time, Salesforce ensures that the user has the permission set before accessing the remote system.
7. **[Enable User External Credentials](https://help.salesforce.com/s/articleView?id=xcloud.nc_user_external_credentials.htm&release=264.0.0&type=5)**  
    Tokens for named credential callouts are encrypted and stored in the User External Credential object. Any user performing an authenticated callout needs profile- or permission set-based access to user external credentials. Most standard permission sets and profiles have access to the User External Credentials object by default. For the guest user profile, and for some custom permission sets and profiles, you must assign User External Credentials object permissions manually.

#### See Also

- [Named Credentials](https://help.salesforce.com/s/articleView?id=xcloud.named_credentials_about.htm&release=264.0.0&type=5 "Intended to secure and simplify authenticated API callouts to external systems, a named credential specifies the URL of a callout endpoint and its required authentication parameters in one definition. To streamline your Apex code and simplify the setup of authenticated callouts, specify a named credential as the callout endpoint.")
- [Get Started with Named Credentials](https://help.salesforce.com/s/articleView?id=xcloud.nc_get_started.htm&release=264.0.0&type=5 "Understand the basics of named credentials, including the named credential schema and the authentication protocols that Salesforce supports.")
- [Resources for Named Credentials](https://help.salesforce.com/s/articleView?id=xcloud.nc_resources.htm&release=264.0.0&type=5 "Learn about considerations, troubleshooting tips, and more so that named credentials work the way you intend.")
- [_Named Credentials Developer Guide_: Get Started with Named Credentials](https://developer.salesforce.com/docs/platform/named-credentials/guide/get-started.html)
- [_Named Credentials Developer Guide_: Named Credential API Links](https://developer.salesforce.com/docs/platform/named-credentials/references/named-credentials-reference/nc-api-links.html)
- [_Apex Developer Guide_: Named Credentials as Callout Endpoints](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_named_credentials.htm)