microsoft / vscode-azureresourcegroups

VS Code extension for managing Azure resources.
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureresourcegroups
MIT License
53 stars 28 forks source link

Azure subscription not populating in VS Code #815

Closed richardcarrigan closed 9 months ago

richardcarrigan commented 9 months ago

Problem statement

Despite numerous attempts, logging in to my Azure account always results in the same Azure Cosmos - Pyscope Test subscription showing in my list of resources. This subscription is not mine, and since none of my subscriptions are listed, I'm unable to interact with my Azure subscription(s) through VS Code.

image

What I've tried

Any guidance/support on this issue is greatly appreciated. Thanks!

nturinski commented 9 months ago

Are you able to see this filter button?

image

Once clicked, it should open a list of your subscriptions that you can check/uncheck.

richardcarrigan commented 9 months ago

Hi @nturinski , sorry for the delay. Yes, I'm able to see the filter button when I hover over the subscription name. Unfortunately, when I click on that, the only subscription listed is the one in my previous screenshot which I do not own.

alexweininger commented 9 months ago

We've recently updated the extensions and the Azure Resources extension to use the built-in VS Code Microsoft authentication. Learn more about this move in the Azure Resources v0.8.0 release notes.

From now on, you sign out like so: image

Explicitly selecting my tenant ID

How did you go about doing this? The new method as of v0.8.0 is by using the "Sign in to Directory..." command from the palette. Try that out if you haven't.

richardcarrigan commented 9 months ago

Signing out and then signing back in using the new "Sign in to Directory..." command fixed the issue. Thanks @alexweininger and @nturinski for your support!