sfdx force:limits:api:display
Tag: sfdx
-
Reading Time: < 1 minuteWhen running the command that makes the login against our Sandbox org, it redirects to a localhost URL and then it display an error that doesn’t give us so much information
sfdx auth:web:login -a myuser@abc.com --instanceurl=https://xxxxx--xxxxx.my.salesforce.com
The error
Cannot read properties of undefined (reading ‘id’)This is most likely not an error with the Salesforce CLI. Please ensure all information is accurate and try again.This error can be related to the enhanced domain enabled or just the wrong URL typed in the login command. Read more about
Enhanced Domain enabled https://help.salesforce.com/s/articleView?id=sf.domain_name_enhanced_enable.htm&type=5Solution
To fix this error, add just “sandbox” to the URL so the pattern must be “xxxxxx–xxxx.sandbox.my.salesforce.com”
sfdx auth:web:login -a myuser@abc.com --instanceurl=https://xxxxxx--xxxx.sandbox.my.salesforce.com
Photo by Markus Spiske on Unsplash -
Reading Time: < 1 minute
Let say you want to execute this command using Salesforce CLI:
sfdx auth:web:login -a myusername@myorg.sandbox --instanceurl=https://mysandbox-domain.lightning.force.com
This error is shown
ERROR running auth:web:login: Invalid client credentials. Verify the OAuth client secret and ID. Error authenticating with auth code due to: grant type not supported
Error authenticating with auth code due to: grant type not supported. This is most likely not an error with the Salesforce CLI. Please ensure all information is accurate and try again.
The issue is you are using lightning.force.com domain instead of my.salesforce.com
sfdx auth:web:login -a myusername@myorg.sandbox --instanceurl=https://mysandbox-domain.my.salesforce.com
Photo by Elisa Ventur on Unsplash