I've created a custom profile in a scratch org using Salesforce CLI.

The thing is that by using either sfdx force:mdapi:retrieve or sfdx force:source:pull commands, only the Admin profile is retrieved.

Is there a way to retrieve the other profiles so that I can deploy them to another org?

  • 3
    Have you tried sfdx force:source:retrieve -m "Profile" -u <orgAlias> ? it worked me for and retrieved all profile from scratch.
    – sfdx bomb
    Dec 20, 2019 at 12:23

1 Answer 1


It's been a while since I've had a chance to do DX work, but I found you can definitely get the profiles by including them in your package.xml or package manifest (Setup > Apps > Package Manager or Setup > Create > Packages). You must explicitly include the profile names in order to get them to appear with the mdapi commands.

You must log in to answer this question.

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