Repository navigation
Set DataApiBuilder as the SqlClient registered application - #3926
Open
Cheena Malhotra (cheenamalhotra) wants to merge 2 commits into
Open
Cheena Malhotra (cheenamalhotra) wants to merge 2 commits into
Cheena Malhotra (cheenamalhotra) wants to merge 2 commits into
Conversation
Identify query, metadata, and CLI SQL connections before login. Upgrade SqlClient and aligned dependencies while preserving Azure authentication support. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Cheena Malhotra (cheenamalhotra)
requested review from
Alekhya-Polavarapu,
Aniruddh Munde (Aniruddh25),
RubenCerna2079,
aaronburtle,
cwebb-msft,
Mohit G (gmohit21),
mhyon,
rusamant,
Sourabh Jain (sourabh1007),
Souvik Ghosh (souvikghosh04),
Stuart Padley (stuartpa) and
vadeveka
as code owners
November 17, 2026 19:01
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The SqlClient 6.1→7.1 driver and Entra packaging changes require human validation of live SQL Server/DWSQL logins and published-artifact authentication, which reported testing does not cover.
No open issues 🎉
What changed in this PR
This PR identifies Data API builder in SQL Server client telemetry through SqlClient’s registered application identity, covering SQL Server and DWSQL connections without changing connection strings or per-user pooling.
Changes:
- Set the registered identity before connections open for query execution, metadata operations, and CLI autoentity discovery.
- Upgrade SqlClient and IdentityModel dependencies, include the Azure authentication extension, and update the native SNI license reference.
- Add regression coverage and document the identity’s independence from application-name telemetry opt-out and its pooling limitations.
| File | Description |
|---|---|
| src/Service.Tests/UnitTests/SqlQueryExecutorUnitTests.cs | Test registered identity and Azure authentication provider availability. |
| src/Service.Tests/UnitTests/SqlMetadataProviderHelperTests.cs | Test identity assignment on unopened metadata connections. |
| src/Service.Tests/UnitTests/ApplicationNameGeneralTelemetryTests.cs | Assert identity on metadata and per-user request connections. |
| src/Directory.Packages.props | Upgrade SqlClient and IdentityModel; add the Azure extension version. |
| src/Core/Services/MetadataProviders/SqlMetadataProvider.cs | Route metadata connection creation through an overridable factory. |
| src/Core/Services/MetadataProviders/MsSqlMetadataProvider.cs | Assign the registered identity to metadata connections. |
| src/Core/Resolvers/MsSqlQueryExecutor.cs | Assign the registered identity to query connections. |
| src/Core/Azure.DataApiBuilder.Core.csproj | Reference the Azure authentication extension. |
| src/Config/Telemetry/ApplicationNameTelemetry.cs | Suppress the obsolete warning when classifying legacy authentication. |
| src/Config/Azure.DataApiBuilder.Config.csproj | Reference the Azure authentication extension. |
| src/Cli/ConfigGenerator.cs | Assign the identity before CLI autoentity discovery connects. |
| scripts/notice-generation.ps1 | Point notice generation to the updated SNI license filename. |
| external_licenses/Microsoft.Data.SqlClient.SNI.7.1.2.License.txt | Include the unchanged SNI license under the updated filename. |
| docs/design/application-name-telemetry.md | Document registered identity, opt-out independence, and pooling limitations. |
Review effort: Balanced
The configured feed resolves System.IdentityModel.Tokens.Jwt 8.16.0 to 8.17.0, causing NU1605 downgrades against JsonWebTokens 8.16.0. Align the IdentityModel package family to 8.17.0. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Why make this change?
Identify Data API builder in SQL Server client telemetry using SqlClient's registered application identity, rather than relying only on the connection string's Application Name.
API reference: https://learn.microsoft.com/en-us/dotnet/api/microsoft.data.sqlclient.sqlconnection.registeredapplication?view=sqlclient-dotnet-7.1
What is this change?
RegisteredApplication.DataApiBuilderbefore SQL Server and DWSQL connections open, covering query execution, metadata discovery/validation, and CLI autoentity discovery.How was this tested?
Passed: CLI build, 368 focused SQL connection/metadata/telemetry and JWT authentication tests, and formatting verification.
Database validation limitation: The broader focused run passed 353 tests but failed
TestRetryPolicySuccessfullyExecutingQueryAfterNAttemptsbecause the local SQL Server certificate chain is not trusted. The successful run below excludes that database-dependent test. Full database integration suites were not run.The configured package feed returned 401 for the new SqlClient packages, so local restore used Microsoft's public mirror. Repository feed configuration is unchanged.
Exact commands and results:
Sample Request(s)
N/A. No REST, GraphQL, or CLI request syntax changes. The identity is assigned automatically when SQL connections are initialized.