Troubleshooting for Named Credentials
Review the potential causes and troubleshooting steps for common issues that you can encounter when you set up or use named credentials.
Required Editions
| Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience |
| Available in: all editions |
| Issue | Potential Causes and Troubleshooting Steps |
|---|---|
| The external system returns the wrong HTTP response code. | When callouts from Salesforce use invalid or expired credentials, some external systems
return non-standard HTTP status codes, such as From Setup, in the Quick Find box, enter Named Credentials, and then select Named Credentials. Create or edit an external credential, and in the Additional Status Codes for Token Refresh field, enter the 4xx status codes that your external system returns. |
| Named credential callouts fail. | To perform callouts using a named credential, users need access to:
Without both of these permissions, callouts can fail. |
If you create a named credential for an installed managed package, you must allowlist the package’s namespace before it can make callouts. See Allowed Namespaces for Callouts in Create and Edit a Named Credential. Named credentials that are created from Apex code in a managed package are disabled for callouts by default. To allow callouts using these named credentials, go to the named credential in Setup, and then turn on Enabled for Callouts. Be aware of security considerations when enabling callouts for named credentials that originate from Apex. |

