Skip to content

[6.1] WAM Broker changes#4387

Merged
cheenamalhotra merged 12 commits into
release/6.1from
dev/cheena/6.1-wam
Jun 23, 2026
Merged

[6.1] WAM Broker changes#4387
cheenamalhotra merged 12 commits into
release/6.1from
dev/cheena/6.1-wam

Conversation

@cheenamalhotra

Copy link
Copy Markdown
Member

Ports changes from #4288 to release/6.1 branch.

Copilot AI review requested due to automatic review settings June 19, 2026 16:57
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Jun 19, 2026
@cheenamalhotra cheenamalhotra added this to the 6.1.6 milestone Jun 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Ports WAM broker support for Entra ID authentication flows into the 6.1 release branch, including new configuration and test coverage, plus updates to MSAL dependencies and a WinForms repro app.

Changes:

  • Adds WAM broker wiring (Windows-only) and an options-bag constructor to ActiveDirectoryAuthenticationProvider, including redirect-URI selection and parent-window forwarding.
  • Adds useWamBroker parsing in SqlAuthenticationProviderManager and serializes tests that mutate the global auth-provider registry.
  • Updates MSAL package versions and introduces a WinForms AzureSqlConnector sample app for manual validation.

Reviewed changes

Copilot reviewed 26 out of 28 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
tools/specs/Microsoft.Data.SqlClient.nuspec Bumps MSAL version and adds Microsoft.Identity.Client.Broker package dependency.
src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft/Data/SqlClient/WamBrokerTests.cs Adds unit tests validating WAM broker enablement/disablement behaviors and parent-window callback clearing.
src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft/Data/SqlClient/SqlAuthenticationProviderCollection.cs Adds xUnit collection definition to serialize tests that mutate the global provider registry (UnitTests).
src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlAuthenticationProviderCollection.cs Adds xUnit collection definition to serialize tests that mutate the global provider registry (FunctionalTests).
src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj Ensures the new FunctionalTests collection definition is compiled.
src/Microsoft.Data.SqlClient/tests/FunctionalTests/AADAuthenticationTests.cs Serializes AAD functional tests to avoid global provider registry races.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.cs Parses useWamBroker from config and uses the options ctor when configured.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ActiveDirectoryAuthenticationProviderOptions.cs Introduces the public options-bag type for provider construction.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ActiveDirectoryAuthenticationProvider.Windows.cs Adds Windows-only parent HWND resolution (console/root-owner fallback) for MSAL UI parenting.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ActiveDirectoryAuthenticationProvider.cs Implements WAM broker enablement, redirect-URI selection, device-code timeout handling, and parent-window forwarding.
src/Microsoft.Data.SqlClient/src/Interop/Windows/User32/User32.cs Adds minimal user32.dll interop for GetAncestor root-owner discovery.
src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Kernel32.cs Adds GetConsoleWindow interop for Windows console HWND discovery.
src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj Includes new provider/options/interop sources and adds Microsoft.Identity.Client.Broker reference for netfx build.
src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj Includes new provider/options/interop sources, adds broker reference, and extends IVT.
src/Microsoft.Data.SqlClient.sln Updates solution metadata and adds the AzureSqlConnector app to the solution.
src/Directory.Packages.props Bumps MSAL version and adds centralized version for Microsoft.Identity.Client.Broker.
doc/snippets/Microsoft.Data.SqlClient/ActiveDirectoryAuthenticationProviderOptions.xml Adds XML doc snippets for the new options-bag type.
doc/snippets/Microsoft.Data.SqlClient/ActiveDirectoryAuthenticationProvider.xml Adds XML docs for the new options-based constructor.
doc/apps/Directory.Packages.props Adds central package management for doc/apps projects (SNI package versions).
doc/apps/AzureSqlConnector/README.md Documents the new WinForms repro app (build/run/modes/usage).
doc/apps/AzureSqlConnector/Program.cs App entry point; launches a mode selector and runs the chosen form.
doc/apps/AzureSqlConnector/ModeSelectorForm.cs Startup dialog to choose UI-thread vs worker-thread connection mode.
doc/apps/AzureSqlConnector/MainFormWorker.Designer.cs WinForms designer code for worker-thread connector form.
doc/apps/AzureSqlConnector/MainFormWorker.cs Worker-thread connector variant using Task.Run + sync Open(), with DCF callback UX.
doc/apps/AzureSqlConnector/MainForm.Designer.cs WinForms designer code for UI-thread connector form.
doc/apps/AzureSqlConnector/MainForm.cs UI-thread connector variant supporting OpenAsync vs sync Open() modes.
doc/apps/AzureSqlConnector/IdentityQuery.cs Shared identity-query SQL text used by both connector forms.
doc/apps/AzureSqlConnector/AzureSqlConnector.csproj Adds the WinForms repro app project with conditional TFM selection and project references to SqlClient.
Files not reviewed (2)
  • doc/apps/AzureSqlConnector/MainForm.Designer.cs: Generated file
  • doc/apps/AzureSqlConnector/MainFormWorker.Designer.cs: Generated file

Comment thread doc/apps/AzureSqlConnector/ModeSelectorForm.cs Outdated
Comment thread doc/apps/AzureSqlConnector/MainForm.cs Outdated
Comment thread doc/apps/AzureSqlConnector/MainFormWorker.Designer.cs Outdated
Comment thread doc/apps/AzureSqlConnector/README.md Outdated
Comment thread doc/apps/AzureSqlConnector/README.md Outdated
Comment thread doc/apps/AzureSqlConnector/README.md Outdated
Comment thread doc/apps/AzureSqlConnector/README.md Outdated
Comment thread doc/apps/AzureSqlConnector/MainForm.cs Outdated
Comment thread doc/apps/AzureSqlConnector/MainForm.cs Outdated
Comment thread doc/apps/AzureSqlConnector/MainForm.cs Outdated
Comment thread doc/apps/AzureSqlConnector/MainForm.cs Outdated
Comment thread doc/apps/AzureSqlConnector/MainForm.cs Outdated
Comment thread doc/apps/AzureSqlConnector/MainForm.cs Outdated
Comment thread doc/apps/AzureSqlConnector/MainFormWorker.cs Outdated
Comment thread doc/apps/AzureSqlConnector/MainFormWorker.cs Outdated
Comment thread doc/apps/AzureSqlConnector/MainFormWorker.cs Outdated
Comment thread doc/apps/AzureSqlConnector/MainFormWorker.cs Outdated
Comment thread doc/apps/AzureSqlConnector/MainFormWorker.cs Outdated
Comment thread doc/apps/AzureSqlConnector/MainFormWorker.cs Outdated
Comment thread doc/apps/AzureSqlConnector/MainFormWorker.cs Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 19, 2026 17:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 26 out of 28 changed files in this pull request and generated 8 comments.

Files not reviewed (2)
  • doc/apps/AzureSqlConnector/MainForm.Designer.cs: Generated file
  • doc/apps/AzureSqlConnector/MainFormWorker.Designer.cs: Generated file

Comment thread doc/apps/AzureSqlConnector/MainForm.cs Outdated
Comment thread doc/apps/AzureSqlConnector/MainForm.cs
Comment thread doc/apps/AzureSqlConnector/MainForm.cs Outdated
Comment thread doc/apps/AzureSqlConnector/MainForm.cs Outdated
Comment thread doc/apps/AzureSqlConnector/MainFormWorker.cs
Comment thread doc/apps/AzureSqlConnector/README.md Outdated
Comment thread src/Microsoft.Data.SqlClient.sln
…in netcore project

Co-authored-by: cheenamalhotra <13396919+cheenamalhotra@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 19, 2026 17:49
@cheenamalhotra cheenamalhotra enabled auto-merge (squash) June 22, 2026 19:16
@cheenamalhotra cheenamalhotra moved this from In progress to In review in SqlClient Board Jun 22, 2026
apoorvdeshmukh
apoorvdeshmukh previously approved these changes Jun 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 29 out of 31 changed files in this pull request and generated 3 comments.

Files not reviewed (2)
  • doc/apps/AzureSqlConnector/MainForm.Designer.cs: Generated file
  • doc/apps/AzureSqlConnector/MainFormWorker.Designer.cs: Generated file

Comment thread src/Microsoft.Data.SqlClient.sln
Comment thread tools/specs/Microsoft.Data.SqlClient.nuspec
Copilot AI review requested due to automatic review settings June 22, 2026 23:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 32 out of 34 changed files in this pull request and generated 4 comments.

Files not reviewed (2)
  • doc/apps/AzureSqlConnector/MainForm.Designer.cs: Generated file
  • doc/apps/AzureSqlConnector/MainFormWorker.Designer.cs: Generated file

Comment thread src/Directory.Packages.props
@github-project-automation github-project-automation Bot moved this from In review to Waiting for customer in SqlClient Board Jun 23, 2026
@cheenamalhotra cheenamalhotra merged commit 6402e1c into release/6.1 Jun 23, 2026
276 checks passed
@cheenamalhotra cheenamalhotra deleted the dev/cheena/6.1-wam branch June 23, 2026 15:50
@github-project-automation github-project-automation Bot moved this from Waiting for customer to Done in SqlClient Board Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Public API 🆕 Issues/PRs that introduce new APIs to the driver.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants