I'm a SFDX/GitHub newbie, following the instructions on Migrating an existing project from a production org to DX/Git repo. Everything is going well until I try to spin up the scratch org...

pmcclellan$ sfdx force:org:create -s -f config/project-scratch-def.json -a myscratchorg

and then I get the error:

ERROR:  You do not have access to the [ScratchOrgInfo] object.

I have searched this error here and elsewhere, and the consensus solution is that either the devhub isn't authorized, or the user doesn't have appropriate permissions on the devhub org. I have triple-checked both those conditions:

I have assigned the Manage Environment Hub permission set to myself, and I have re-authorized the dev hub with the CLI (subsequent to setting the permission set):

pmcclellan$ sfdx force:auth:web:login -d -a myhuborg

I have verified that the org is authorized with...

sfdx force:org:list

... and the org shows up with the correct alias, username, org Id and shows Connected.

I have verified that project-scratch-def.json exists in the /config/ directory:

    "orgName": "pmcclellan Company",
    "edition": "Developer",
    "orgPreferences" : {
        "enabled": ["S1DesktopEnabled"]

I'm out of things I can think of to try. Any tips?


1 Answer 1


Unfortunately the discussion on this question is no longer accessible, so I hope I am not treading ground that's already been reviewed.

Reviewing the permissions in a fresh SFDX Dev Hub trial organization may be helpful. Those orgs come with a single permission set ("Salesforce DX") that does nothing save to provide the following object access:

Active Scratch Orgs: Read, Edit, Delete
Namespace Registries: Read, Create, Edit, Delete
Scratch Org Infos: Read, Create, Edit, Delete

These are just object permission settings, not system-level permissions. (The Manage Environment Hub permission is not available in these trial orgs).

Does your permission set provide these object permissions?

You must log in to answer this question.

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