You need to sign in to do that
Don't have an account?
Nancy Smith 32
Salesforce DX trailhead error: You do not have access to the [scratchorgiinfo] object
I installed Developer Hub Trial Org 64-bit Windows option.
I created a trial project with:
sfdx force:project:create -n geolocation
But, when I try to create the scratch org with:
sfdx force:org:create -s -f config/project-scratch-def.json -a GeoAppScratch
I get this:
ERROR running force:org:create: You do not have access to the [scratchorgiinfo] object
I've tried several suggested fixes that I found when I searched for the above error. None has resolved the issue for me.
I created a trial project with:
sfdx force:project:create -n geolocation
But, when I try to create the scratch org with:
sfdx force:org:create -s -f config/project-scratch-def.json -a GeoAppScratch
I get this:
ERROR running force:org:create: You do not have access to the [scratchorgiinfo] object
I've tried several suggested fixes that I found when I searched for the above error. None has resolved the issue for me.
Alap Mistry
Did you register for a dev hub org from here https://developer.salesforce.com/promotions/orgs/dx-signup. You need to register for a dev hub org as first step. Download the SFDX CLI tool .. You are mentioning "installed Developer Hub Trial Org 64-bit Windows option" .. I assume you are referring to SFDX CLI tool. This is the second step. Third .. you need to authorize the dev hub org. and after that you can start creating the scratch org. In case this is not working, try creating a permission set on the dev hub org providing CRUD on Scratch Org Info, Active Scratch Org and Namespace Registry objects.
The Dev Hub is comprised of objects with permissions that allow admins to control the level of access available to a user and an org. I tried accessing the dev hub from the quick find box so as to give access to these objects to devhub users but the dev hub option isnt available. I use the trial edition and my developer org as my dev hub org.
How do I give access to these objects from my org? Itried creating a scratch org and i am having error accessing the scratchinfo object.
Any help would be great. thanks
So you need to authourize developer hub (not developer org) using sfdx command and then run your scratch org command.
Authorize with this command: sfdx force:auth:web:login -d -a DevHub
Then enter your command to create a scratch org under this devhub.
Use the following link.
https://developer.salesforce.com/promotions/orgs/dx-signup
1 - From previous steps, I've used the DX trial version obtained by registering at https://developer.salesforce.com/promotions/orgs/dx-signup
2 - create project MutualFundExplorer 3 - Change directory: 4 - Login into my DX trial Org --> At this stage I selected the Org I've created in step 1 5 - Create a new Scratch Org 6 - Generate password for org 7 - get the following variables by querying the org (you will use them in the next step): Instance Url, Username and Password 8 - now follow the link to download the package: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t46000001DnYm
a couple of things on this steps: (1) logout from any org you are so the install does not auto launch and (2) follow the link. You will be prompted with the salesforce login page. Click on Log In with a Different Username and then click on the link below Use Custom Domain. Paste the Instance URL obtained in Step 7 and the use the credentials after clicking Continue.
9 -Once the package has finished installing, create the permission set in the Scratch Org
10 - pull the data into your local drive 11-create package directory 12 - Unzip the package: the instruction in the trailhead didn't make the trick for me, so i went to Windows Explorer and extracted it myself:
13 - Convert the package and get everything ready for deployment 14 - Now begin the tricky part, here you create a new login to the org you will use to validate this module, in my case I've called it TH When the browser prompts you with the credentials, you select the user and password for your trailhead 15 - Deploy the project into your org 16 - Here is the second trick, if you attempt to validate the module it will fail telling you that the app could not be found. Here is where you go to your Trailhead org and go Setup, Users, select your user and add the DreamInvest permission set
I may have skipped some steps but if you mix these instructions with the instructions in https://trailhead.salesforce.com/modules/sfdx_app_dev/units/sfdx_app_dev_deploy you will be able to finish the module
I hope this may help others!
I am also getting the asme issue ERROR: You do not have access to the [ScratchOrgInfo] object.
I was getting the same error
Resolution:
Issue Explained:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_auth.htm#cli_reference_force_auth
-d | --setdefaultdevhubusername
Optional
Sets the authenticated org as the default Dev Hub org for scratch org creation.
Type: flag
The issue was my defaultdevhubusername was pointing to a different org. When you call sfdx force:auth:web:login w/ the -d flag it will also set the defaultdevhubusername that is used for scratch org auth.
Alternatively if you already have the user setup in your keychain you can just set the defaultdevhubusername directly without creating a new key chain alias.
Hi All
This error usually comes if you didn't Enabled Dev Hub Org
here are the steps to Enable Dev Hub
- Login to Salesforce DevHub Org Click on setup
- type Dev Hub there and click on Dev Hub
- Enable Dev Hub by clicking on the button there
After doing this try to create scratch org, You will not get the same error again.Hope this will help
Thanks
1. Just enable the Dev Hub in ur salesforce org thats lear the error.
thanks.
https://playful-badger-irqyzo-dev-ed.lightning.force.com/lightning/setup/DevHub/home
enable the dev hub :)
I had faced the same issue. So what I did was:
1) check-in ur terminal of Visual studio code : sfdx force:org:list --all and see which all are authorized org and search for D next to it. Here D refers to as flag for Dev Hub and see to that you have only one D flag.
2)check if you have enabled Dev hub for the D flag authorized org. If not first login to that org and go to Setup > quick find > search for Dev Hub > Click on Dev Hub > Enable it as shown in the screenshot below.
3)Always remember that whenever you are dealing with Visual studio code and Salesforce CLI topics in trailhead, you need to authorize and login only with your newly created Trailhead Playgrounds (note: create one and use it for all the VSC topics) not with the developer account that you have.
4)Now when all this is done. You can sfdx force:org:list --clean to clean all the previous expired scratch orgs.
5)Now give the scratch org command sfdx force:org:create -s -f config/project-scratch-def.json -a GeoAppScratch and check. You will get the success message as seen below.
If you think I answered your question then please mark this as the best answer and share. I am in learning stage so if anyone finds this to be a mistake please let me know. But this was my understanding to the problem and it was solved.
fdx plugins:install @salesforce/plugin-auth@1.4.3
It worked for me after 30min search.. it installs the necessary plugins and works finally