title: Is there a way to connect Azure AD MFA enabled outlook mailbox through a console application C#?
body: <p>I have a console application written in c# which we use to connect to outlook mailbox using exchange service to read the emails from the inbox. Recently, we have migrated to Azure AD with MFA and after that change, my code is throwing 401 Unauthorized error. Can anyone suggest a workaround to authenticate the console to connect and read mail without any user dependency.</p>
  
  <p>Normal WebClient function which uses username and password to connect to outlook.  <a href="https://outlook.office365.com/EWS/Exchange.asmx" rel="nofollow noreferrer">https://outlook.office365.com/EWS/Exchange.asmx</a> is used as the Service object url in code.</p>