Repository navigation
auth: Skip failing tenants instead of aborting subscription listing - #2208
Merged
Merged
Conversation
When listing subscriptions across tenants, a failing tenant (e.g., locked account) would throw a non-NotSignedInError, causing Promise.all to reject and skip all remaining tenants. Now these errors are caught, logged, and the tenant is skipped so other tenants can still be listed. Fixes microsoft/azcode#110
Megan Mott (motm32)
approved these changes
Mar 4, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates subscription enumeration to be resilient to per-tenant failures so that one failing tenant/account doesn’t abort listing subscriptions across other tenants.
Changes:
- Swallow (non-NotSignedInError) errors when listing subscriptions per-tenant and continue processing remaining tenants.
- Add debug logging when skipping tenants/accounts due to unexpected errors.
- Bump
@microsoft/vscode-azext-azureauthversion to6.0.0-alpha.4.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| auth/src/providers/AzureSubscriptionProviderBase.ts | Catch and skip tenant/account failures during subscription enumeration to avoid Promise.all aborting the full run. |
| auth/package.json | Version bump for the auth package. |
| auth/package-lock.json | Lockfile update to reflect the new package version. |
Files not reviewed (1)
- auth/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)
auth/src/providers/AzureSubscriptionProviderBase.ts:166
- This skip-on-error path logs via
logForTenantwhich useslogger.debug. Since debug output is commonly suppressed at normal log levels, tenant failures may become hard to diagnose. Consider usinglogger.warn/logger.error(while still skipping) for these non-NotSignedInError cases so the issue is visible to users and telemetry/log collectors.
this.logForTenant(tenant, `Skipping account+tenant due to error: ${err}`);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
Alex Weininger (@alexweininger) I've opened a new pull request, #2209, to work on those changes. Once the pull request is ready, I'll request review from you. |
#2209) * Initial plan * Log skipped tenant/account errors at warn level with stack trace Co-authored-by: alexweininger <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: alexweininger <[email protected]>
Brandon Waterloo (bwateratmsft)
requested changes
Mar 4, 2026
Brandon Waterloo (bwateratmsft)
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When listing subscriptions across tenants, a failing tenant (e.g., locked account) would throw a non-NotSignedInError, causing Promise.all to reject and skip all remaining tenants. Now these errors are caught, logged, and the tenant is skipped so other tenants can still be listed.
Fixes microsoft/azcode#110