I'm working on scripting an installation of a managed package with SFDX.

I can install the managed package with the following command:

sfdx force:package:install -p 04t0V000000xDxuQAE

Where, the "04t0V000000xDxuQAE" is the Package Version ID returned from the following command on the devhub org:

sfdx force:package:installed:list

The package installs in the scratch org; however none of the permission set licenses appear under the company info (they are in the company info in the dev hub org). How can the installation of a managed package with permission set licenses be scripted for a scratch org?


Scratch Orgs are like Sandboxes. Any installed packages have unlimited licenses, so there won't be any licenses listed. However, you should still be able to assign the permission set via force:user:permset:assign.

  • 1
    Thanks. I'll have to dig in a bit to see what's going on that won't allow me to assign the permset to my scratch org user that has a Salesforce license. I thought it was PSLs, but must be something different. The user license doesn't allow the permission: Custom Permission B2BCommerceAdmin is not valid for this Permission Set. – Peter Knolle Jan 15 '20 at 17:34
  • Hi @PeterKnolle, were you able to install PM Licenses? I have the same issue trying to assign Access B2B Commerce Admin Settings for Sratch Org user. – m_konyk Mar 5 '20 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.