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

auth: Support multi-account scenarios #1827

Merged
merged 17 commits into from
Nov 26, 2024
Merged

auth: Support multi-account scenarios #1827

merged 17 commits into from
Nov 26, 2024

Conversation

alexweininger
Copy link
Member

TODO: bump version appropriately

The changes are basically adding an account parameter wherever there's a tenant parameter. The rest of the changes are fixes for issues that came up with the new multi-account scenarios. The changes in this PR have been tested by two partner teams, Bicep and SCOPE studio.

Fixes:

  • Added a new call to getSubscriptionsForTenant that gets subscriptions in the users home tenant. This can mean duplicates show up in the initial result so I added logic to remove them.
  • Added logic to remove duplicate subscriptions while retaining those from different accounts.
  • Enhanced the isSignedIn method to check for a session across all accounts if no tenant or account is provided.
  • Refactored the getSubscriptionsForTenant method to ensure it returns an empty list if the user is not signed in to the specified tenant or account.

@alexweininger alexweininger requested a review from a team as a code owner November 26, 2024 16:47
bwateratmsft
bwateratmsft previously approved these changes Nov 26, 2024
auth/src/VSCodeAzureSubscriptionProvider.ts Show resolved Hide resolved
@alexweininger
Copy link
Member Author

These are big changes with potential to change behavior, but there are no breaking API typings changes. Should I bump to 4.0.0 or to 3.1.0?

@bwateratmsft
Copy link
Contributor

These are big changes with potential to change behavior, but there are no breaking API typings changes. Should I bump to 4.0.0 or to 3.1.0?

That's a good question. I'd lean toward 3.1.0 since there aren't strictly breaking changes.

@alexweininger alexweininger merged commit 25c8831 into main Nov 26, 2024
4 checks passed
@alexweininger alexweininger deleted the alex/multi-account branch November 26, 2024 17:54
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

Successfully merging this pull request may close these issues.

3 participants