I have created an unlocked package. The unlocked package contains named credential. The unlock package process creation when failed when there was no in the file.

So, I had to add actualPassword in the package. With this, I did create an unlocked package successfully and installed in an org.

I can see the deployed named credential, however the issue is I have to edit named credential and update password manually.

Doesn't the password that was added in the *namedCredential file gets automatically inserted when unlocked package is deployed in an org.

Is this behavior same in managed package as well? I have not tried but heard that managed package deployment will add named credential password as well (without user having to edit the password manually)

  • any updates on this? looking at publishing a tool that would require someone setup their api key by modifying the named credential, but i'm worried that future updates might clear out the password ... would love to hear if you figured anything out with your testing Commented Dec 1, 2019 at 21:47
  • I have the same issue, password is written inside the namedcredentials file that is part of my unlocked package but when I deploy to a new scratch org/sandbox, this does not get deployed and I have to manually overwrite password. Any update on that on your side? @RalphCallaway
    – jeromegv
    Commented Jan 9, 2020 at 3:49


You must log in to answer this question.