I've signed into one of my Azure accounts with Azure Account Extension via VS Code. I didn't find any button to sign out or switch accounts. How do I sign out or switch accounts?
-
1It's in the documentation https://github.com/Microsoft/vscode-azure-account – Dec 10 '18 at 16:04
-
Before I posted this question, I've read this document. But I don't understand how to use the command. Anyway, thanks for your help. – Andy Lai Dec 11 '18 at 00:43
4 Answers
There is no button that you can find to sign in or sign out in VS Code with Azure Account Extension. The extension works with commands from Command Palette.
In VS Code press Ctrl+Shift+p to see the command palette and write the symbol >
, after that you can see any command you need including the sign out
command to work with this extension.
-
1Yeah just press `Ctrl+Shift+p` and the symbol `>` and then you can see most commands. VS Code is great. – Llazar Feb 22 '19 at 17:57
-
1
-
After I open the psh terminal, I used the below Install-Module Az -RequiredVersion 9.0.1 -Scope CurrentUser -Force -AllowClobber Install-Module Az Import-Module Az Connect-Azaccount – Sanket Sirotiya Apr 19 '23 at 17:28
Use the shortcut Ctrl + Shift + P to bring up VS Code command palette
In the command palette prompt that appears type:
Azure: Sign Out

- 7,780
- 3
- 46
- 42
The shortest way to achieve this in vscode is by pressing F1
to show the command pallet and then type azso
(Azure Sign Out), first letter of each word, and press enter.
Note that this "first letter of each word" also works with other commands, very handy if you're a keyboard/shortcut person.

- 1,649
- 20
- 25
I had the same issue that I resolved as follows. There may be better ways of doing it. I just tried this work around to see if it works - and it did for me:
Use Azure CLI to sign in via the
PowerShell
(I have latest version 7.3) usingPS ...> az login
In the same PowerShell Window, set your desired subscription as follows:
PS ...> az account set --subscription 'Your subscription name or Id'
In
VSCode
, in any of the Azure task window, place your mouse over the task window (e.g. Static Web Apps window) label and click on the refresh icon as shown below. This will show list of all your subscriptions (I have two subscriptions shown below). Select your desired subscription.

- 21,967
- 37
- 158
- 332