Skip to content

Expose MSAL logs to the application #1846

Description

@shueybubbles

Is your feature request related to a problem? Please describe.

For SSMS customer support we need to provide MSAL logs when connections fail.
We can provide them for AAD Interactive because SSMS has a custom implementation, but the other AAD methods rely on the default implementations in SqlClient.

https://learn.microsoft.com/en-us/entra/msal/dotnet/advanced/exceptions/msal-logging

Describe the solution you'd like

Two options (not mutually exclusive);

  1. Define a logging callback delegate that's compatible with the MSAL logging callback and allow apps to set an event handler.
  2. Convert the MSAL log events to SqlClient EventSource events that get logged like any other eventsource events.

One wrinkle is how to allow the app or the customer to configure exposure of PII events in the stream.

Describe alternatives you've considered

The only alternative available is to write a custom auth handler for every AAD auth type.

Activity

  1. lcheunglci commented on Nov 23, 2022

    @lcheunglci
    Contributor

    Thanks @shueybubbles for the feature request. We'll have to get back to you after the release.

  2. moved this from To triage to Backlog in SqlClient Boardon Nov 21, 2025
  3. added this to the 8.0.0 milestone on Sep 11, 2026
  4. priyankatiwari08 commented on Sep 17, 2026

    @priyankatiwari08
    Contributor

    /triage

  5. github-actions commented on Sep 17, 2026

    @github-actions

    test comment from cli

    Generated by SqlClient Issue Auto-Triage for #1846 · copilot · auto · 61.7 AIC · ⌖ 13.2 AIC · ⊞ 11.9K · ◷

  6. moved this from Backlog to In progress in SqlClient Boardon Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

ApprovedUse for Features approved for implementation.

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions