microsoft / vscode-azure-account

Common Azure Login extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account
Other
138 stars 130 forks source link

Figuring out how to sign out of Azure is very difficult #295

Open charris-msft opened 3 years ago

charris-msft commented 3 years ago

Recommendation: The readme.md should contain instructions on signing out of Azure

Here is what I went through to figure out how to do it:

  1. Signed into Azure using my work account, but realized I needed to use my personal account. How do I sign out w/o exiting VS Code? I expected to find something within the Azure menu, or by right-clicking on the Azure menu
  2. I signed out using the account icon (lower left above the config icon), but the Azure menu still showed the same set of subscriptions.
  3. I looked at the account icon again and it told me to sign in to sync settings. Obviously it doesn't have anything to do with the Azure menu
  4. I browsed through all of the menus, but didn't notice anything
  5. I restarted VS Code, and the Azure menu still showed the same subscriptions
  6. I noticed "Azure: [my email address]" at the bottom of VS Code, but clicking on it just pulled up the list of subs for me to select.
  7. From Extensions, I uninstalled the Azure App Service extension, then reloaded VS Code
  8. Then I reinstalled the Azure App Service extension and the Azure menu still has all of my work subscriptions!
  9. I searched for settings in my workfolder.vscode, but didn't find anything interesting
  10. I searched for "out" (signout, sign-out, log out, etc.) in the Details of the Azure App Service extension, but found nothing.
  11. I visited the wiki (Visit the wiki for more information about Azure App Service and how to use the advanced features of the extension), but that provided no useful information.
  12. I pinged my team at work to ask how I could sign out and was told press F1 and search for "Azure Sign Out" and that finally did it.
ejizba commented 3 years ago

Discussed this during triage just now. We feel we should make "sign out" more obvious through the Azure account extension, rather than just in docs.

For example,

sohailinnofactor commented 1 year ago

hello, i tried logging off with f1+azure sing out , but i could see same subs in az account list , i want to know where is it running this sing out command because after pressing it nothing shows up on screen :(

codekoenig commented 11 months ago

@sohailinnofactor You might have figured that out by now, but for everyone else:

If you are signed in with your Microsoft account for settings sync, this will also be used for your Azure extension. You cannot login with another account or sign out.

When you sign out of your settings sync account, suddenly your Azure extension will also be signed out. And only then, you can sign in to another Azure account.

Very frustrating behavior and absolutely not obvious.

alexweininger commented 11 months ago

@codekoenig this new behavior is explained in v0.8.0 release notes

steeren commented 7 months ago

@codekoenig THANK YOU!!! In a million years I wouldn't have gotten this!!! Clearly when you can't seem to sign out using the... sign out option, your first impulse is not to bee line for release docs. I would never have joined the dots.

For anyone struggling as I did (and didn't get what codekoenig was getting at, in the activity bar, above settings you have accounts.

image