-
Notifications
You must be signed in to change notification settings - Fork 762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New auth code doesn't work if multiple accounts are signed in or you sign in to an account with access to multiple tenants. #15453
Comments
Fixes [14101](#14101) NOTE: I plan on not merging this until the current release ships, so we have some time to dogfood internally before the December release. Fixes #14101 ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/Azure/bicep/pull/15403) - [x] Check if documentation needs to change - [x] https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/deploy-vscode - entered #15450 - [x] Clouds - [x] Wait for multiple-account issue to be fixed (see below)? - Entered #15453 - [x] Check #8714 - [ ] Add to readme notes - UI changes below - Multiple F1 commands if Azure Account extension still installed - Multiple accounts issue if still a problem Overview of UI changes (images from https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/deploy-vscode) > <img width="732" alt="image" src="https://github.com/user-attachments/assets/22dd96cb-2300-4047-a0be-dbb189b99f19"> NEW: You never see this menu now. Instead, if you aren't logged in, you'll see something like this: <img width="374" alt="image" src="https://github.com/user-attachments/assets/92b35128-67e3-4e8e-b472-7aea0c1d52b7"> > <img width="782" alt="image" src="https://github.com/user-attachments/assets/fef8c2d9-1060-4c1b-9fa4-1ed26c23db65"> NEW: Bicep no longer uses the Azure Account extension (it's being deprecated). Instead, it uses new built-in vscode functionality that is integrated with vscode's UI, e.g.: <img width="655" alt="image" src="https://github.com/user-attachments/assets/579b96b1-ee35-4502-8403-2196081a6d77"> and also integrates with other extensions like the Azure Resources extension. The statement that deployment doesn't use values from the bicepconfig.json is correct. Instead, if you need to sign in to a custom cloud, use this vscode setting before signing in: <img width="1254" alt="image" src="https://github.com/user-attachments/assets/cecb5371-767c-4d1c-8fdf-4fdd0154d04a"> Note: multiple signed-in accounts isn't currently supported (you may need to sign out of one first using the vscode UI above), although hopefully that will be fixed soon, perhaps even before this feature change ships. --------- Co-authored-by: Stephen Weatherford <Stephen.Weatherford.com>
Fixes #15453 ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/Azure/bicep/pull/15652) --------- Co-authored-by: Stephen Weatherford <Stephen.Weatherford.com>
Need to verify and also update the required vscode version. |
Will need to add code on our side for the moment to allow a user to select a tenant to sign into if we can't find subscriptions. Also need a couple of fixes from the azext authors. |
Work-around: If you run into the error “No subscriptions found.” In the output window, please let me know, and then try this work-around: Install the “Azure Resources” extension, go to the Azure view, and see if it “Sign in to Directory…”. If so, click it and follow instructions. Bicep deploy should then work. TL;DR In the next Bicep release (due very soon), I've changed our Azure authentication code for the Deploy Bicep File… menu inside VS Code so that it no longer depends on the Azure Account extension (see #14101), and instead uses VSCode’s authentication mechanism. This change affects deployment inside VS Code only, and does not affect the CLI or module restoration, nor does it fix the issue with VisualStudioCode credentials in bicepconfig.json). All previous scenarios seem to be working fine, but I have seen some problems when signed in to multiple accounts (this wasn’t possible with the previous code, but is now via Azure: Sign In (azureResourceGroups.login) command) and when users have access to multiple tenants. |
@maskati, can you let us know if you have seen this? |
@puicchan I have not seen this recently. |
microsoft/vscode-azuretools#1809 affects the new code for #14101, which should ship in December. If the bug isn't fixed before we ship, may need to work around it (I think I can at least detect the issue and ask them to sign out of one of them).
The text was updated successfully, but these errors were encountered: