Repository navigation
Support Entra ID sign-in in sovereign clouds and explain sign-in failures - #1050
Draft
Tomasz Naumowicz (tnaum-ms) wants to merge 50 commits into
Draft
Tomasz Naumowicz (tnaum-ms) wants to merge 50 commits into
Tomasz Naumowicz (tnaum-ms) wants to merge 50 commits into
Conversation
Record the investigation of Entra ID sign-in failures (AADSTS65002) in Azure US Government: the client and resource app IDs, why preauthorization is fixed outside the extension, the opaque broker error, per-cloud OSSRDBMS audiences published in ARM metadata, and how other extensions handle sovereign clouds. Add decisions and the iteration plan for a cloud-aware DocumentDB token audience (interactive, managed identity, custom clouds) and a single-table Entra error classifier routed through ConnectionDiagnosticsService. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ity flows Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nces Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
✅ CI passed: full tier (full run requested by Tomasz Naumowicz (@tnaum-ms) for 7f2a288)Commit
Code quality
Build sizeNo page, activation, VSIX or other bundle size changed by 5% or 50 KiB or more against Artifacts: VSIX | Bundle-reports-40388721389 | L1-manifest-report-40388721389 All graphs (exact bytes)
Packaged bytes. Shared chunks count in every graph that loads them, so rows do not add up. Updated in place on every run. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nd pass findings and recommendations
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the startup join with successful metadata observations across historical releases. Record the enhancement review disposition and retain the R9 completion note. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…andoff Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
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.
What changed
Microsoft Entra ID connections to Azure DocumentDB now work with the Azure cloud VS Code is signed in to (Azure US Government, Azure China, custom clouds), and sign-in failures get actionable explanations.
https://ossrdbms-aad.database.windows.net. It now requests the open-source database resource of the selected cloud (microsoft-sovereign-cloud.environment):…usgovcloudapi.netfor US Government,…chinacloudapi.cnfor China. Public-cloud behavior is unchanged (tests pin the scope string).documentDB.customEnvironment.ossrdbmsEndpointsetting, the custom cloud's sign-in host, or its ARM metadata (/metadata/endpoints?api-version=2022-09-01), and fail clearly otherwise. They never fall back to the public audience.azure.com,azure.us,azure.cn) belongs to another cloud than the one VS Code is signed in to, the extension stops before sign-in and names the setting to change.TOKEN_RESOURCE.src/documentdb/auth/entraErrors/entraErrorRules.ts) maps AADSTS codes and the opaque Windows broker error to messages that say who can fix the problem. It plugs intoConnectionDiagnosticsService, so every surface that already explains connection errors gets it.entraCloud.resolved(cloud, sign-in provider, broker mode, host cloud, chosen token resource and why), with no tenant, account, host, or connection-string values.docs/user-manual/sovereign-clouds.md.Why
A reported issue: in Azure US Government, listing resources works but connecting with Entra ID fails with AADSTS65002. Two causes:
Rejected alternatives (own client ID, falling back to the public audience, buttons on diagnostics) and the reasoning are in decisions.md.
Scope
Not in this PR: the service-side preauthorization; buttons on diagnostic messages (Report issue, Switch cloud); an ask-once prompt for custom clouds.
Validation
npm run buildand targeted Vitest (auth, shell, playground, services, copy connection string, settings) pass.*.azure.cnhosts, so the switch to the China audience cannot break existing users.l10n,prettier-fix,lint,typecheck:tests, full Vitest,package) are deferred until ready for review. The AI pre-review has not run yet.Links