Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 12, 2026

Description

Tenant dropdown in connection dialog only displayed tenant names, causing ambiguity when multiple tenants share identical names (e.g., "Default Directory"). Dropdown now shows format: TenantName (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

Changes:

  • Updated tenant Option rendering in fabricExplorerHeader.component.tsx to display ${tenant.name} (${tenant.id})
  • Updated tenant initialization logic to use same format for dropdown button display

Both tenant name and ID were already present in IAzureTenant interface—only UI rendering changed.

Code Changes Checklist

  • New or updated unit tests added
  • All existing tests pass (npm run test)
  • Code follows contributing guidelines
  • Telemetry/logging updated if relevant
  • No regressions or UX breakage

Reviewers: Please read our reviewer guidelines

Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature Request]: Enhance the tenant selection dropdown</issue_title>
<issue_description>### Feature Description

Image

Summary:
When using the mssql extension in VS Code and authenticating via Azure Active Directory (AAD) with MFA, the tenant selection experience is limited. Currently, the dropdown only shows tenant names, making it difficult to distinguish between tenants with similar or identical names (e.g., multiple tenants named "Default Directory").

Request:

Enhance the tenant selection dropdown to include the Tenant ID alongside the Tenant Name.

Allow users to manually enter a Tenant ID if desired, in addition to selecting from the dropdown list.

Problem and Motivation

Justification:

Many users work across multiple Azure tenants, especially consultants, MSPs, or users in organizations with multiple B2B configurations.

Tenant names alone are often non-descriptive or duplicated (e.g., Default Directory), which causes confusion and incorrect tenant selection.

Including the Tenant ID would disambiguate tenants and improve reliability.

Manual entry of a Tenant ID would provide a fallback when the pick list does not behave as expected or is missing a tenant.

Expected Behavior:

The tenant selection list should display items as:
Contoso (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
where the GUID is the tenant ID.

An optional input box should be available to manually enter a tenant ID if the tenant is not visible or recognizable in the dropdown.

Related Area

  • Connection dialog
  • Query editor
  • IntelliSense/auto-completion
  • Query results panel
  • Object Explorer
  • Table Designer
  • Schema Compare
  • Schema Designer
  • Query Plan Visualizer
  • Other (please describe below)

If you selected "Other", please describe the area

No response

Confirmation

  • I have searched existing feature requests and couldn't find a match
  • I want to help implement this feature</issue_description>

<agent_instructions>Start in extensions/mssql/src/connectionconfig/connectionDialogWebviewController.ts

There's a spot where the options are set. Should be as simple as updating that.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@kburtram @croblesm @Benjin this looks like a reasonable, straightforward improvement. I’ll move it into the current milestone. If you think we shouldn’t take this change, please resolve the issue and note the rationale. Thanks!

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 12, 2026 18:26
Co-authored-by: Benjin <1609827+Benjin@users.noreply.github.com>
Co-authored-by: Benjin <1609827+Benjin@users.noreply.github.com>
Copilot AI changed the title [WIP] Enhance tenant selection dropdown with Tenant ID Display tenant ID in connection dialog tenant dropdown Feb 12, 2026
Copilot AI requested a review from Benjin February 12, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Enhance the tenant selection dropdown

2 participants