-
Notifications
You must be signed in to change notification settings - Fork 330
Enable WAM Broker support for Entra ID Auth modes #4288
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
Merged
Merged
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
3db6009
Enable WAM Broker support for Entra ID Auth modes
cheenamalhotra 7a0a460
Add test connection project for validating WAM broker behavior on UI …
cheenamalhotra d23e4a6
Merge branch 'main' into dev/cheena/entra-wam-broker
cheenamalhotra bc5178a
Update redirectURI + minor changes
cheenamalhotra 240e5ce
Merge branch 'dev/cheena/entra-wam-broker' of https://github.com/dotn…
cheenamalhotra bca2a62
Comments/cleanup
cheenamalhotra 58083b6
Update config file
cheenamalhotra fd54502
Update Redirect URI for Unix
cheenamalhotra b657f32
Remove duplication
cheenamalhotra 01529eb
Fix unix build
cheenamalhotra 152b44e
Apply suggestions from code review
cheenamalhotra fff68be
Apply suggestions from code review
cheenamalhotra 17564ca
Apply suggestions from code review
cheenamalhotra 0d105e0
Update comment
cheenamalhotra 97fce03
useWamBroker option and tests
cheenamalhotra de30171
Merge branch 'main' into dev/cheena/entra-wam-broker
cheenamalhotra 84949bb
Update api and docs
cheenamalhotra 82a2d4e
handle .net standard
cheenamalhotra f14c637
Remove specs
cheenamalhotra 81312dc
Add collection, address docs
cheenamalhotra 5683852
fix: allow AzureSqlConnector fallback build on non-Windows
Copilot 3f91b03
Address feedback
cheenamalhotra d23b760
Address comments/more changes
cheenamalhotra 449d289
Verify Sibling Assembly
cheenamalhotra 90760e3
Deprecation note for future
cheenamalhotra 69b3787
Support clearing user token cache to enable retesting token acquisiti…
cheenamalhotra b44ece5
More improvements, clear token cache properly + fix device code flow …
cheenamalhotra b82106d
Remove temp file
cheenamalhotra 3064e77
Apply suggestions from code review
cheenamalhotra d436a77
Remove unwanted new ctors, fix errors
cheenamalhotra 6ef039e
Merge branch 'dev/cheena/entra-wam-broker' of https://github.com/dotn…
cheenamalhotra 8c89141
Address PR review: fix </param>, expand WamBroker tests, README note
cheenamalhotra ff4f373
More improvements + tests
cheenamalhotra da1929d
Last Updates
cheenamalhotra 681b64f
Update MSAL as well
cheenamalhotra e628e2b
Potential fix for pull request finding
cheenamalhotra f8a7c96
Merge branch 'main' into dev/cheena/entra-wam-broker
cheenamalhotra 7eac499
Removed unwanted changes
cheenamalhotra 744af8d
Missing doc
cheenamalhotra c003f4a
Final changes
cheenamalhotra 8a72de1
More updates, rename options type
cheenamalhotra ed46a31
Update provider instance initialization flow, other minor changes
cheenamalhotra b802a2e
Disable broker for AAD Password auth (not supported by MSAL unless us…
cheenamalhotra a63ac86
Revert "Disable broker for AAD Password auth (not supported by MSAL u…
cheenamalhotra 5fdca68
Remove AAD Password auth tests
cheenamalhotra 9e703ed
Fix wording
cheenamalhotra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <!-- | ||
| WinForms WAM-broker sample. Targets net481 (for callers still on .NET Framework) | ||
| plus net10.0-windows (for modern .NET) so the sample exercises both API | ||
| flavors: the legacy SetIWin32WindowFunc path on net481 and the modern | ||
| SetParentActivityOrWindowFunc path on net10. The net10.0-windows TFM | ||
| restores and builds cleanly on Linux/macOS hosts even though the resulting | ||
| binary only runs on Windows, so the sample no longer needs a separate | ||
| no-op cross-platform fallback. | ||
| --> | ||
| <PropertyGroup> | ||
| <TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">net481;net10.0-windows</TargetFrameworks> | ||
| <TargetFramework Condition="'$(OS)' != 'Windows_NT'">net10.0-windows</TargetFramework> | ||
| <!-- Required to build the net*-windows TFM on Linux/macOS (e.g. CodeQL); without | ||
| this, the SDK fails with NETSDK1100. The produced binary still only runs on Windows. --> | ||
| <EnableWindowsTargeting Condition="'$(OS)' != 'Windows_NT'">true</EnableWindowsTargeting> | ||
| <OutputType>WinExe</OutputType> | ||
| <RootNamespace>Microsoft.Data.SqlClient.Samples.AzureSqlConnector</RootNamespace> | ||
| <AssemblyName>AzureSqlConnector</AssemblyName> | ||
| <UseWindowsForms>true</UseWindowsForms> | ||
| <LangVersion>latest</LangVersion> | ||
| <Nullable>disable</Nullable> | ||
| <Platforms>AnyCPU</Platforms> | ||
|
cheenamalhotra marked this conversation as resolved.
|
||
| <GenerateAssemblyInfo>true</GenerateAssemblyInfo> | ||
| <IsPackable>false</IsPackable> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="..\..\..\src\Microsoft.Data.SqlClient.Extensions\Azure\src\Azure.csproj" /> | ||
| <ProjectReference Include="..\..\..\src\Microsoft.Data.SqlClient\src\Microsoft.Data.SqlClient.csproj" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| namespace Microsoft.Data.SqlClient.Samples.AzureSqlConnector | ||
| { | ||
| /// <summary> | ||
| /// Shared SQL text used by both <see cref="MainForm"/> (UI-thread variant) and | ||
| /// <see cref="MainFormWorker"/> (worker-thread variant). Keeping the literal in one place | ||
| /// avoids drift when one variant gains a new column. | ||
| /// </summary> | ||
| internal static class IdentityQuery | ||
| { | ||
| public const string CommandText = | ||
| "SELECT " + | ||
| " SUSER_SNAME() AS LoggedInUser, " + | ||
| " ORIGINAL_LOGIN() AS OriginalLogin, " + | ||
| " USER_NAME() AS DatabaseUser, " + | ||
| " SUSER_ID() AS LoginSid, " + | ||
| " DB_NAME() AS DatabaseName, " + | ||
| " @@SERVERNAME AS ServerName, " + | ||
| " HOST_NAME() AS ClientHost, " + | ||
| " APP_NAME() AS AppName, " + | ||
| " SESSION_USER AS SessionUser, " + | ||
| " CURRENT_USER AS CurrentUser, " + | ||
| " @@SPID AS SessionId, " + | ||
| " @@VERSION AS ServerVersion;"; | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.