---
schema_version: "1"
id: c0a31df0417f5ee62c1c1d523fa015470b983499f8c1a8b209f96d649ff4d07b
title: Authorize an Org for an SFDX Project
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/salesforce-commerce/guides/d2c-commerce/b2b-b2c-comm-auth-org-lwc-project.md
canonical_url: https://developer.salesforce.com/docs/commerce/salesforce-commerce/guide/b2b-b2c-comm-auth-org-lwc-project.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: d6cab8dd7d73802a8bf136373faf897f20e0dd922a99742eb21ce809070f6a20
products:
  - B2B Commerce Developer Guide
  - Salesforce APIs
---
# 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.](https://developer.salesforce.com/media/d2c-commerce/auth_org_vscode.png)

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.](https://developer.salesforce.com/media/d2c-commerce/auth_org_success.png)

**See Also**

- [Create a Sample Lightning Web Component](https://developer.salesforce.com/docs/commerce/salesforce-commerce/guide/b2b-b2c-comm-create-sample-lwc.htm)
