---
schema_version: "1"
id: 166850450d0f83e5c13357121ace6eeabdaf2eb63bf030fae9b383d814a97077
title: Named Credentials Packaging Guide
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/security/named-credentials/guides/nc-packaging-dev-guide.md
canonical_url: https://developer.salesforce.com/docs/platform/named-credentials/guide/nc-packaging-dev-guide.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 379e08e2568edbb1c6d62bb087586ef0a7702440c39d218546a2dd2dd0d35bc7
products:
  - Named Credentials
  - Security
---
# Named Credentials Packaging Guide

Salesforce supports packaging for named credentials. With [Govern, Manage, and Release Changes with DevOps Center](https://help.salesforce.com/s/articleView?id=platform.devops_center_overview.htm) and your version control system, you can create managed 2GP and unlocked packages to promote named credentials from a development to a production environment and distribute named credentials across many orgs. Then, you can automate the population of authentication tokens across orgs so users can make authenticated callouts.

The packaging and deployment process for named credentials involves these high-level steps.

1. Create the named credential in a development environment.
2. Extract all metadata for the named credential from the Salesforce org, move it to a version control system, and create the managed 2GP package.
3. Install the managed 2GP package in the target org.
4. Use the Connect API to populate the external credential’s principal in the target org.
5. To verify that credentials work as expected, make a test callout in the target org.

After you install the named credential in the target org, you can also upgrade the package and reinstall it without overwriting the credential’s principals.

For more information about these steps, review each section.
