microsoft / vscode-azureresourcegroups

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

Fix Cloud Shell in sovereign clouds #927

Closed alexweininger closed 2 months ago

alexweininger commented 2 months ago

Fixes #911

We weren't properly handling sovereign clouds in the Cloud Shell when getting the session to use for the requests related to Cloud Shell.

My solution is to get the session from a subscription because that will handle getting a session for the proper tenant and sovereign cloud for us thanks to the auth package.

Since we're getting the session from the subscription, we now have a check for if the selected tenant has no subscriptions we don't continue. I confirmed with the cloud shell team that they don't plan on supporting cases where the user has no subscriptions.