Enabling communication traces in C# application for Azure AD authentication with SQL DB using token-based mechanism with Multi-factor authentication (MFA)

First published on MSDN on Aug 29, 2017

security team presents a code sample ( as VS project) allowing to enable communication traces for ADAL managed library used to support Universal with for SQL DB ( see also

Azure AD authentication extensions for Azure SQL DB and SQL DW tools

). The ADAL traces help to communication issues related to and ADAL . The attached C# code sample is based on existing blog post

Token-based authentication including Multi-factor auth (MFA) for Azure SQL DB using Azure Active Directory (AD)

(see the details there) and was extended by the ADAL traces. The sample below collects all ADAL traces and writes them to the application console. Please note that it is possible to choose different level of tracing (see the comments in the main program). For further questions on this topic please contact SQLAADAuth@microsoft.com alias.



This article was originally published by Microsoft's Azure SQL Database Blog. You can find the original article here.