Skip to content
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

[@microsoft/vscode-azext-azureauth] Removing the trusted extension and signing in to a second account may result in empty subscriptions #1702

Open
xiaolang124 opened this issue Mar 6, 2024 · 4 comments

Comments

@xiaolang124
Copy link

Steps to repro:

  1. Sign In with Account A using the AzureSubscriptionProvider.signIn() method
  2. You can see all the subs of A
  3. Click Account -> Manage trusted extensions and remove just used extension
  4. Sign In with Account B using the AzureSubscriptionProvider.signIn() method
  5. You cannot get any subscription. It returns an empty [ ]

Related code

	let disposable2 = vscode.commands.registerCommand('authtest.listSubs', async () => {

		const provider = await ext.subscriptionProviderFactory();
		if (!await provider.isSignedIn()) {
			void provider.signIn();
		}
		if (await provider.isSignedIn()) {
			vscode.window.showInformationMessage('Signed in!');
			var l = await provider.getSubscriptions(false);
			vscode.window.showInformationMessage('Got subscriptions!' + l.length);
		}
	});
@xiaolang124 xiaolang124 changed the title [@microsoft/vscode-azext-azureauth] Remove trusted extension and Sign in to second account will get empty subs [@microsoft/vscode-azext-azureauth] Removing the trusted extension and signing in to a second account may result in empty subscriptions Mar 6, 2024
@bwateratmsft
Copy link
Contributor

Do you have any value for the VSCode setting azureResourceGroups.selectedSubscriptions?

@xiaolang124
Copy link
Author

@bwateratmsft I don't think so. I haven't edited the settings. Where can I verify this setting?

@bwateratmsft
Copy link
Contributor

image

@xiaolang124
Copy link
Author

I don't have this setting, yet I'm still encountering this problem.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants