Я пытаюсь настроить panteon exchangelib для Office365, но почему-то это не работает, не уверен, что это из-за корпоративных брандмауэров или неправильной конфигурации.Exchangelib office365 auth fail: бесконечный цикл
Я пробовал 40+ конфигураций, с и без ссылок автообнаружения.
Я пытаюсь подключиться к почтовому ящику группы, а не к частной почтовой учетной записи.
Код:
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='[email protected]',
password='topsecret'),
auth_type=NTLM,
verify_ssl=False
)
account = Account(
primary_smtp_address='[email protected]',
autodiscover=False,
config=config,
access_type=IMPERSONATION)
logging.basicConfig(level=logging.DEBUG)
pprint (account.folders())
Выход (бесконечный цикл, по-видимому):
C:\Users\mcindea\Downloads\dist\exchangelib-1.7.6>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)