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?

1 Answer 1


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. Commented Jan 15, 2020 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
    Commented Mar 5, 2020 at 11:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .