Python/exchangelib - How to access shared public f

2019-06-02 06:30发布

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)

0条回答
登录 后发表回答