After a sandbox refresh, a Salesforce callout can fail even though its Named Credential is still visible in Setup. The endpoint configuration and the credentials needed to authenticate are separate. Restoring the connection starts by confirming where the sandbox will send requests.
This walkthrough uses a fictional fulfillment integration. A Salesforce automation checks a shipment’s status through a modern Named Credential called Fulfillment_API. The test service provides a read-only status endpoint and a synthetic shipment, DEMO-1042. Substitute your team’s approved endpoint and test data.
1. Identify what the refresh copied
A Named Credential identifies the endpoint; its linked External Credential defines how to authenticate and which principals are available. The principal represents an identity at the remote system. A named principal uses a shared identity for authorized Salesforce callers; a per-user principal authenticates users individually.
Salesforce copies the modern credential configuration into a new, refreshed, or cloned sandbox, but excludes sensitive values such as tokens, API keys, and passwords. An entry in Setup therefore does not prove that the connection is ready. These refresh considerations apply to the modern model; check separately if the integration still uses a legacy credential.
2. Verify the destination before restoring authentication
- Inventory the automations that reference Fulfillment_API. Keep any outbound writes disabled during initial testing.
- Open Setup → Named Credentials. Compare the URL with the fulfillment team’s documented test endpoint. Confirm the host and base path; a sandbox label by itself does not make a URL safe.
- Check the linked External Credential as well. If it uses OAuth, verify the token issuer, client registration, and scopes belong to the test environment. A test API URL is not enough if the authentication configuration still points to production.
Use a non-production identity with access limited to the approved test operation. If no safe endpoint or identity is available, leave the callout disabled. Do not copy production secrets into tickets, source control, or test logs.
3. Restore the principal and its access
Open the External Credential and locate the principal used by the callout. Populate the test values or authenticate using the steps for that protocol. For example, an OAuth Browser Flow named principal can be authenticated from the principal’s Actions menu. A per-user setup requires the relevant user to authenticate; a successful admin login does not authenticate everyone else.
Review External Credential Principal Access in the intended permission set. Ensure the user who makes the callout can use the principal, and check the protocol-specific permissions on User External Credentials where applicable. Verify the actual execution identity for an automated path rather than assuming it is the user who built the Flow.
If an external service also calls into Salesforce, treat that as a separate connection and identity. See Build a least-privilege Salesforce integration user for the inbound side.
4. Run a small test as the intended caller
Exercise the same action or automation path the business process uses, starting with a read-only lookup for DEMO-1042. Confirm the status returned matches the fixture on the fulfillment team’s test system. Ask the service owner to verify that the request arrived at the test service and used the expected identity.
- Authorized caller: the approved user or automation can retrieve the test shipment.
- Missing principal access: a test user without the grant cannot use that principal. Check for other permission sets or profiles that also grant it before treating the negative test as valid.
- Unknown shipment: check that a legitimate not-found response follows the correct error path and does not look like successful synchronization.
If the call never reaches the service, check local credential setup and caller access before changing remote permissions. If the service returns a 401 or 403, compare its logs with the request identity, token, and allowed scopes. Treat the status as a starting clue, not proof of one cause. Keep secrets and full authorization headers out of the evidence you collect.
5. Make the next refresh repeatable
Keep a small runbook: credential API name, sandbox endpoint, authentication variant, identity owner, permission set, read-only test operation, and expected result. Record where the authorized admin can retrieve test secrets without putting the secrets in the runbook. Re-enable writes only after a separately approved test proves they affect non-production records.
Setup Audit Trail can help trace credential configuration changes, but it does not capture changes to sensitive principal authentication parameters. Use the appropriate credential-management records for those events. The Setup Audit Trail guide explains how to review the Salesforce side of the change.
Official Salesforce references
- Considerations for Named Credentials — sandbox copies and audit limitations.
- Named Credentials Glossary — endpoints, principals, and token storage.
- Authentication status for External Credentials — protocol-specific setup steps.
- Enable External Credential Principals — principal access for callers.
- Permissions for User External Credentials — access by protocol and identity type.
Published November 10, 2026. Salesforce references checked on this date. The integration and test data are fictional; follow your organization’s sandbox and credential procedures.