Expose MSAL logs to the application
- Dominant language
- C#
- Stars
- 989
- Forks
- 340
- Avg merge
- 4d 19h
- Merged PRs (30d)
- 72
Description
### 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.
Contributor guide
Assessment
This issue has not been assessed yet.