Loading
Salesforce Enforces New Security Requirements in Summer 2026Read More
Tableau Semantics
Authorize Your Org

Authorize Your Org

The extension uses Salesforce CLI for authentication. You must authorize an org before using extension features.

  1. If you haven't installed the Salesforce CLI, run this command to install it:
    npm install -g @salesforce/cli

    Alternatively, see Install the Salesforce CLI for other installation options.

  2. Create a Salesforce DX project.
    1. In VS Code, open the View menu and choose Command Palette. (Type Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux) to quickly open the Command Palette.)
    2. Type SFDX: Create Project in the palette and select it from the list.
    3. Choose a directory on your computer to store the files for the project, and click Create Project.
      VS Code refreshes and your project appears in the Explorer panel. For more information on creating a Salesforce DX project, see Create a Salesforce DX Project.
  3. Authorize your org.
    1. In VS Code, open the command palette.
    2. Type SFDX: Authorize an Org and select it from the list.
    3. Choose Custom (Custom org) as the org type.
    4. Enter your org's login URL.
      For production: https://login.salesforce.com. For sandbox: https://test.salesforce.com. For My Domain: https://your-domain.my.salesforce.com
    5. Log in with your Salesforce credentials and allow access when prompted.
    6. (Optional) Set an alias for your org, especially if you work with multiple orgs.
    7. Complete the OAuth flow in your browser.
      Use your org's login page URL, not a URL from an already logged-in session
  4. Verify the connection.
    Open a terminal in VS Code and run sf org display. You should see your org's Instance URL, Username, and Access Token. After it is authorized, the extension automatically uses Salesforce CLI credentials for all operations.
 
Loading
Salesforce Help | Article