I've been asked to build a DevOps pipeline for an ISV that has a first-generation managed package (1GP) with no source in version control (yet).


sfdx force:mdapi:retrieve -r ./mdapiPkg -p "ThePackageName" -u PkgOrg 

against the packaging org returns a zip file with ONLY these folders:

enter image description here

Note the absence of a classes or triggers folder but I know (and can see) the Packaging Org has 100+ Apex classes and some triggers.

Now, here's the interesting bit.

  • I was not granted System Administrator permissions in the Packaging Org, nor Author Apex.

Assuming this is a permissions issue, what are the minimum permissions I need to request of the ISV to get a full set of components for ThePackageName into my SFDX project so I can then push to version control?

  • Any reason you're not doing a sfdx force:source:retrieve to get Source formatting? Commented Jun 1, 2020 at 11:38
  • 1
    @BrianMiller - same result with sfdx force:source:retrieve - no apex classes or triggers returned
    – cropredy
    Commented Jun 1, 2020 at 15:44

1 Answer 1


The answer is:

Whether you are using:

  • sfdx force:source:retrieve or
  • sfdx force:mdapi:retrieve

You need Author Apex permission; screenshots show the results

enter image description here enter image description here

I could find no documentation reference that Author Apex was a required permission to fetch Apex from a Packaging Org (though I did see such note in Gearset DevOps vendor doc).

You must log in to answer this question.

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