function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shubham Raj 29Shubham Raj 29 

SFDX: Authorize an Org in Visual code studio.

Hii all, 
I am facing issue in SFDX: Authorization. As"SFDX: Authorize an Org " Command is not showing in my option. What to do.User-added image
Bhargavi TunuguntlaBhargavi Tunuguntla
Hi Shubham ,
You have to create a project first. Then and only then the other commands will become available for you.
Please refer the below link:
https://salesforce.stackexchange.com/questions/242581/no-option-for-sfdxauthorize-an-org-command-in-vs-code-command-palette

Let me know if this was helpful.
Thanks.
Shubham Raj 29Shubham Raj 29
I had already created the project and I am inside it. And still not getting the options. You could see on the left side of the previous image as well as in this. Earlier there was an issue of java path, but I have resolved it. Now I am stuck into this.
  User-added image
Ajay K DubediAjay K Dubedi
Hi Shubham,

I hope you are doing well but make sure you followed these steps:

- Installed VS code with CLI 
- Open the Command Palette by pressing Ctrl+Shift+P, If you are using Windows or Cmd+Shift+P on macOS
- Type and select SFDX: Create Project
- Enter your project name
- Create a new folder or Select a folder to store the project
- Make sure after creating a project you have to authorize your org to type "SFDX: Authorize an Org" 
- You have to give credential for login, after completing this process you are able to create LWC project in VS code

For Create LWC Project you have to follow this command
- In Visual Studio code, open the Command Palette by pressing Ctrl+Shift+P on Windows or Cmd+Shift+P on macOS
- Type or Select SFDX: Create Lightning Web Component
- Press Enter to accept the default force-app/main/default/lwc
- Enter your project name
- Press Enter
- Now you can check one project will be active inside LWC folder in vs code

You can follow this link for more help:
https://www.youtube.com/watch?v=V_riFQU5iNA

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks,
Ajay Dubedi
Shubham Raj 29Shubham Raj 29

Hii all,
I have sort out the problem by updating the "salesforce cli", "Visual Studio Code" and then I have again installed the related extensions again.
Now it's working perfectly.

Ken Koellner @ EngagewareKen Koellner @ Engageware
I'm facing the same issue.  I created a project but the "SFDX: Authorize an Org" command is not in the pallete.

I appears I have the stuff to use dev hub and scracth orgs but not regular orgs.

Is there anyone that can tell me if I have the latest stuff and if not how to get it?

The extensions I have installed--
User-added image
The CLI run from the command line says --
ttlm-kkoellner:catdev kkoellner$ sfdx version
sfdx-cli/7.21.0-964f56bd1a darwin-x64 node-v10.15.3
ttlm-kkoellner:catdev kkoellner$
VS Code says there are no update avaiable--
Code
Version 1.21.1 (1.21.1)
79b44aa704ce542d8ca4a3cc44cfca566e7720f1
2018-03-14T14:34:33.071Z

 
Ken Koellner @ EngagewareKen Koellner @ Engageware
I tried deinstalling an reinstalling and now I see a button to update to 46.11.0.  But I press that, it goes to "Installing" but then nothing happens, it goes back to as shown below.
User-added image
Ken Koellner @ EngagewareKen Koellner @ Engageware
I got it to work.  No matter how many times I tried to upgrade Salesforce Integration it kept reverting to 42, not 46.

Even thought VSC said there was no upgrade avaiable, I went out and downloaded a new copy.  I now have Version: 1.37.1.  Once I did that, when I downloaded SF CLI, I got 46 instead of 42 and the command is there.
Rob Koch 27Rob Koch 27
I also took the steps Ken did and it worked: 1) Unistall CLI, 2) Install CLI directly (not from Visual Studio); 3) Restart system. I now have Version 7.72.

User-added image
 
Shilpa DaramShilpa Daram
FIXED in a simple way !!!!!!
My system is Windows 10 64 bit.. I had the same issue. Instead of running multiple updates or look for anything else, running "sfdx update" from the terminal of the VS Code fixed the problem easily.
Meghna SinghMeghna Singh
Thanks Shilpa,your solution worked like a charm
Omar Gonzalez ReyesOmar Gonzalez Reyes
Thanks Shilpa!
Saptarshi PaulSaptarshi Paul
In Terminal type "SFDX" and enter. It should resolve the issue.
Daniela SerafimDaniela Serafim
Inside the terminal on VSCode I had to use "sfdx auth:web:login" and it opened the web browser so I could login with the same credentials for Trailhead Playground.
I had some problems trying to remember my username so I accessed my Trailhead Playground personal information so I could get it. 
Seema SuryanarayanSeema Suryanarayan
User-added imageI'm having this problem please anyone help me in this