Newer Version Available

This content describes an older version of this product. View Latest

Authorize an Org Using Its SFDX Authorization URL

Use an org's Salesforce DX (SFDX) authorization URL to authorize an org in continuous integration (CI) environments, which are fully automated and don’t support the human interactivity of logging into a browser.
  1. Open a terminal (macOS and Linux) or command prompt (Windows) on the computer where you’ve already authorized the org using a Web browser.
  2. Get your org’s SFDX authorization URL and store it in a file by running this command.
    1sf org display --target-org my-org --verbose --json > authFile.json
    The JSON output includes a key called sfdxAuthUrl, whose value is the org’s SFDX authorization URL.
  3. In your CI environment, authorize the org by referencing the authFile.json file with this command.
    1sf org login sfdx-url --sfdx-url-file authFile.json
For more information and examples, see the reference about the org login sfdx-url command in the Salesforce CLI Command Reference.