Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds extension-side support for connecting with the ActiveDirectoryDefault (Microsoft Entra ID Default) authentication mode, including UI plumbing, connection profile validation, and unit test coverage.
Changes:
- Introduces
ActiveDirectoryDefaultas a supported authentication type across shared interfaces and model enums. - Updates connection profile validation and connection-string parsing allowlist to accept
ActiveDirectoryDefault. - Adds localized display text and expands unit tests/mocks to cover the new authentication mode.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| localization/xliff/vscode-mssql.xlf | Adds new localized strings for the new auth mode and updates an error message (auto-generated localization file). |
| extensions/mssql/l10n/bundle.l10n.json | Adds new localized key/value entries for the new auth mode and updates an error message (localization bundle). |
| extensions/mssql/src/constants/locConstants.ts | Adds a localized label for “Microsoft Entra Id - Default” and updates unsupported-auth error message text. |
| extensions/mssql/src/sharedInterfaces/connectionDialog.ts | Adds AuthenticationType.ActiveDirectoryDefault to the shared (webview) auth type enum. |
| extensions/mssql/src/models/interfaces.ts | Adds AuthenticationTypes.ActiveDirectoryDefault to the core model enum. |
| extensions/mssql/src/models/connectionProfile.ts | Treats ActiveDirectoryDefault as server-only for isValidProfile() validation. |
| extensions/mssql/src/models/connectionCredentials.ts | Adds the new auth type to the auth-type quick pick choices. |
| extensions/mssql/src/connectionconfig/connectionDialogWebviewController.ts | Allows connection-string import to accept ActiveDirectoryDefault. |
| extensions/mssql/src/objectExplorer/objectExplorerService.ts | Forces the VS Code Azure sign-in prompt when retrying after a missing VS Code Entra auth error. |
| extensions/mssql/test/unit/mocks.ts | Updates mock capabilities to include the new auth type. |
| extensions/mssql/test/unit/connectionProfile.test.ts | Adds a unit test asserting server-only validity for ActiveDirectoryDefault. |
| extensions/mssql/test/unit/connectionCredentials.test.ts | Adds a unit test ensuring the auth type is preserved in createConnectionInfo(). |
| extensions/mssql/test/unit/connectionDialogWebviewController.test.ts | Adds unit tests for UI visibility expectations and connection-string import with ActiveDirectoryDefault. |
extensions/mssql/src/connectionconfig/connectionDialogWebviewController.ts
Show resolved
Hide resolved
PR Changes
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #21828 +/- ##
==========================================
+ Coverage 73.91% 73.93% +0.01%
==========================================
Files 338 338
Lines 102104 102153 +49
Branches 5950 5955 +5
==========================================
+ Hits 75474 75528 +54
+ Misses 26630 26625 -5
🚀 New features to boost your workflow:
|
extensions/mssql/src/connectionconfig/connectionDialogWebviewController.ts
Show resolved
Hide resolved
extensions/mssql/src/connectionconfig/connectionDialogWebviewController.ts
Show resolved
Hide resolved
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.
Description
Adding support for authentication via
ActiveDirectoryDefaultmode, which instructs the MDS driver to look for a credential on its own in a number of different places, including Az powershell, Az CLI, a shared token cache, and environment credentials (which covers client ID + secret/cert and username + password).To test, install the Az CLI, then run
az loginto sign in with an account.To do:
Code Changes Checklist
npm run test)Reviewers: Please read our reviewer guidelines