title: Exchangelib office365 auth fail: infinite loop
body: <p>I'm trying to configure python exchangelib for Office365 but somehow it doesn't work, not sure if it's because of the corporate firewalls, or misconfiguration. </p>
  
  <p>I've tried 40+ configs, with and without autodiscover links. </p>
  
  <p>I'm trying to connect to a group mailbox not a private mail account.</p>
  
  <p>Code:</p>
  
  <pre><code>from exchangelib import DELEGATE, Account, Credentials, IMPERSONATION, EWSDateTime, EWSTimeZone, Configuration, NTLM, CalendarItem, Message, Mailbox, Attendee, Q
  from exchangelib.folders import ExtendedProperty, FileAttachment, ItemAttachment, HTMLBody
  import logging
  config = Configuration(
  #service_endpoint='https://triedthisservertoo.com/EWS/Exchange.asmx', 
      server='localSMTPserver',
      credentials = Credentials(
      username='x@xx.com',
      password='topsecret'),
      auth_type=NTLM,
      verify_ssl=False
      )
  
  account = Account(
      primary_smtp_address='x@xx.com',
      autodiscover=False, 
      config=config,
      access_type=IMPERSONATION)
  
  logging.basicConfig(level=logging.DEBUG)
  pprint (account.folders())
  </code></pre>
  
  <p>Output(infinite loop, apparently):</p>
  
  <pre><code>C:\Users\mcindea\Downloads\dist\exchangelib-1.7.6&gt;python test.py
  C:\Users\mcindea\AppData\Local\Programs\Python\Python35-32\lib\site-packages\requests\packages\urllib3\connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding c InsecureRequestWarning)
  C:\Users\mcindea\AppData\Local\Programs\Python\Python35-32\lib\site-packages\requests\packages\urllib3\connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding c  InsecureRequestWarning)
  C:\Users\mcindea\AppData\Local\Programs\Python\Python35-32\lib\site-packages\requests\packages\urllib3\connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding c  InsecureRequestWarning)
  </code></pre>