Authorize an Org for an SFDX Project

To streamline deployment, authorize the org to which SFDX deploys custom objects.

  1. In the Visual Studio Code editor, open the Command Palette by pressing Ctrl+Shift+P (Windows) or Cmd+Shift+P (macOS).

  2. Enter SFDX.

  3. Select SFDX: Authorize an Org

    Screnshot of VS Code Command Palette showing Org options.

  4. Choose the Project Default (org URL in your project.json file), or a Production, Sandbox, or Custom org login URL.

    SFDX opens the Salesforce login portal to your org in a separate browser window.

  5. Log in using your admin credentials.

  6. If you’re prompted to allow access, click Allow.

    After you authenticate in the browser, the CLI remembers your credentials. The success message looks like this:

    Screenshot of successful org authorizaiton message.