Python/exchangelib - How to access shared public folders and calendars

烂漫一生 提交于 2019-12-10 11:42:23

问题


How can I connect to a shared public folder using exchangelib?

from exchangelib import DELEGATE, IMPERSONATION, Account, Credentials, ServiceAccount, \
    EWSDateTime, EWSTimeZone, Configuration, NTLM, CalendarItem, Message, \
    Mailbox, Attendee, Q, ExtendedProperty, FileAttachment, ItemAttachment, \
    HTMLBody, Build, Version

credentials = Credentials(username='DOMAIN\\username', password='password')
config = Configuration(server='server', credentials=credentials, auth_type=NTLM, verify_ssl=False)
account = Account(primary_smtp_address='user@email.com', config=config, autodiscover=False, access_type=DELEGATE)

for i in account.root.get_folders():
    print(i)

When I run the code above I get the output shown below. I'm pretty sure none of these options correspond to a shared public folder.

Folder (AllItems)

Folder (Common Views)

Folder (Deferred Action)

Folder (ExchangeSyncData)

Folder (Finder)

Folder (Freebusy Data)

Folder (RCA_EWSSyncTestFolder)

Folder (Recoverable Items)

Folder (Deletions)

Folder (Purges)

Folder (Versions)

Folder (Reminders)

Folder (Schedule)

Messages (Sharing)

Folder (Shortcuts)

Folder (Spooler Queue)

Folder (System)

Tasks (To-Do Search)

Folder (Top of Information Store)

Calendar (Calendar)

Contacts (Contacts)

Folder (Conversation Action Settings)

Messages (Deleted Items)

Folder (Spam)

Messages (Drafts)

Messages (Inbox)

Messages (Archive)

Folder (Suspected Spam)

Folder (Journal)

Messages (Junk E-Mail)

Folder (Notes)

Messages (Outbox)

Folder (Quick Step Settings)

Folder (RSS Feeds)

Messages (Sent Items)

Messages (Sync Issues)

Messages (Conflicts)

Messages (Local Failures)

Messages (Server Failures)

Tasks (Tasks)

Folder (Transport Queue)

Folder (Views)

来源:https://stackoverflow.com/questions/44958544/python-exchangelib-how-to-access-shared-public-folders-and-calendars

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!