microsoft / microsoft/vscode-mssql

[Feature Request]: Supported extension API for active SQL editor connection context and read-only metadata access

Open
#22,819 2 comments 0 reactions 0 assignees View on GitHub
Area - Shell Enhancement Triage: Needed User-filed
Dominant language
TypeScript
Stars
1.9k
Forks
610
Avg merge
2d 3h
Merged PRs (30d)
97

Description

### Feature Description

Hi,

I maintain Query Puppy for T-SQL, an MIT-licensed semantic T-SQL development extension for Visual Studio Code:

https://github.com/beardedpuppylabs/Query-Puppy-for-T-SQL

Query Puppy currently uses the MSSQL Connection Sharing API to provide semantic IntelliSense without asking users for a second set of SQL Server credentials.

The Connection Sharing API is now marked for retirement, so we are looking for the supported replacement path.

My use case is intentionally narrow.

Query Puppy does not need:
- arbitrary user query execution
- a results grid
- Object Explorer
- database administration
- access to raw passwords or long-lived credentials

I need a supported public extension-integration surface that allows a dependent extension to:

1. Identify the connection context of the active SQL editor.
2. Determine the active server and database.
3. Reliably detect or query connection/database changes.
4. Execute read-only catalog/metadata queries using MSSQL-managed authentication.
5. Enumerate databases on the same server where permitted.
6. Do this without exposing raw credentials to the dependent extension.

Today Query Puppy uses these capabilities for:
- active editor connection/database discovery
- SQL Server schema metadata loading
- same-server cross-database metadata discovery
- persistent semantic metadata caching

I have already isolated the current Connection Sharing implementation behind a backend-neutral adapter so that Query Puppy can migrate to a supported successor without coupling its semantic engine to MSSQL internals.

The desired long-term architecture is:

MSSQL owns:
- connection UI
- authentication
- credentials
- query execution
- results
- database-workbench functionality

Query Puppy consumes only:
- active connection context
- read-only schema/catalog access needed for semantic tooling

Is there an existing or planned public API that covers this use case?

If not, would the MSSQL team consider exposing a small supported metadata/integration API for third-party SQL language tooling before Connection Sharing is removed?

A key requirement for me is that dependent extensions should not need access to raw passwords, tokens, or other long-lived credentials just to provide schema-aware editor features.

Thanks you!

### Problem and Motivation

Query Puppy for T-SQL is a third-party semantic T-SQL development extension that currently relies on the MSSQL Connection Sharing API to understand the active SQL editor connection and load SQL Server schema metadata without asking the user for a second set of credentials.

The Connection Sharing API is now marked for retirement. Without a supported replacement, extensions like Query Puppy would either lose active-connection-aware metadata access or be forced to implement their own authentication and connection stack.

That would duplicate functionality MSSQL already owns and would make the user experience worse, especially for Windows/Integrated authentication, Microsoft Entra authentication, MFA/token refresh, certificate handling, and cross-platform support.

A supported extension API would allow semantic tooling to:
- identify the active SQL editor connection
- determine the active server and database
- react to connection/database changes
- execute read-only catalog/metadata queries using MSSQL-managed authentication
- enumerate databases on the same server where permitted
- avoid exposing raw passwords or long-lived credentials to dependent extensions

This would let third-party semantic extensions complement MSSQL instead of rebuilding connection management, while preserving a seamless workflow for users.

### Related Area

- [ ] Connection dialog (SQL Server | Azure browse/Fabric browse)
- [x] Query editor
- [ ] Query results panel
- [ ] Object Explorer
- [ ] GitHub Copilot integration
- [ ] Preview/Edit data
- [ ] Table Designer
- [ ] Schema Designer
- [ ] Schema Compare
- [ ] Local SQL Server Container provisioning
- [ ] SQL database in Fabric provisioning
- [ ] DACPAC/BACPAC export/import
- [ ] SQL Database projects
- [ ] Query Plan Visualizer
- [x] Other (please describe below)

### If you selected "Other", please describe the area

Extension API / third-party extensibility for active SQL editor connection context and authenticated read-only metadata access.

### Confirmation

- [x] I have searched existing feature requests and couldn't find a match
- [ ] I want to help implement this feature

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the existing Connection Sharing implementation and public extension API entry points in this repository, then compare them with the requested active-editor context and read-only metadata capabilities. Done means the team has defined and documented a supported API path, including authentication boundaries, connection changes, metadata access, and any required tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql, typescript, vscode
Domain
api, database, developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.