No Apex Classes retrieved from a Packaging Org

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?


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).

Source : Link , Question Author : cropredy , Answer Author : cropredy

Leave a Comment