title: Python O365 Authentication when Basic Authentication becomes deprecated
body: <p>I have a script (that I did not write) that uses basic authentication to access email boxes online.  The script uses the following code:</p>
  <pre><code>from O365 import Connection
  
  Connection.login(user, password)
  </code></pre>
  <p>It recently failed.  Doing a bit of research I got the following error:</p>
  <pre><code>'Basic Authentication for Outlook REST API is no longer supported...'
  </code></pre>
  <p>I found some information on <code>https://aka.ms/BasicAuthDeprecated</code>:</p>
  <blockquote>
  <p>Last year, we announced  that in November 2018, we will stop
  supporting  Basic Authentication in the Office 365   Outlook REST API
  v1.0 and this is a  follow up announcement to reiterate that we will
  be decommissioning Basic  Authentication in Outlook REST API v1.0 this
  month. This means that new or  existing apps will not be able to use
  Basic Authentication in v1.0 and Beta  versions of Outlook REST API
  starting December 2018.</p>
  <p>If you have been using Basic Authentication in Office 365 Outlook REST
  API  v1.0/Beta in your app, you should immediately transition to
  Microsoft Graph-  based Outlook REST APIs to continue accessing
  Exchange Online data.</p>
  </blockquote>
  <p>Web authentication is not my strong suit and I'm not sure what I need to do here.  Looks like some sort of registration/token generation is required.</p>