I want to know my sfdx auth url to transfer it to another machine or use as Github Secret key. I have about 10+ different Developer Edition, Sandboxes and Devhub environments which I need in my CI/CD process.

It requires a long time to manually execute sfdx force:org:display --verbose command for every environment and then manually grab and find SFDX Auth URL from the response to copy and paste it into Github Secrets.

Can I automate this or make it more easy to grab the SFDX Auth URL from the command response?

2 Answers 2


You can leverage JQ tool to quickly grab the SFDX Auth URL from the command using --json switch.

Still you need to authorize the env

sfdx force:auth:web:login -a al -r https://test.salesforce.com for sandbox or skip -r parameter for production/Developer Edition environment and substitute al with actual desired alias for the org; and then use --json parameter and pass the result to jq command

sfdx force:org:display -u al --verbose --json | jq '.result.sfdxAuthUrl' -r

To install jq, use brew install jq on MacOS.


Complementary info with respect to @patlatus answer:

The following command can help to obtain the SFDX Auth URL in a temporary file in your local folder. The authorization to the environment is a pre-requisite here as well.

sfdx org:display --target-org alias --verbose --json > authFile.json

where alias is your org alias and authFile.json is the file generated after running the command. Then open the authFile.json file to retrieve the sfdxAuthUrl value. You can delete the file locally afterwards

You must log in to answer this question.

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