【问题标题】:Get members of Exchange Distribution List in Python在 Python 中获取 Exchange 分发列表的成员
【发布时间】:2017-12-01 06:14:16
【问题描述】:

使用exchangelib,您如何获得全球分发列表的成员列表?在包含的测试用例中,我看到了如何在联系人的文件夹中创建和删除 DL,但不引用全局 DL。如有必要,我愿意使用不同的 Python 库。

更新:这是我迄今为止尝试过的。使用此代码,我可以转储我的个人分发列表(和其他联系人)列表,包括成员。我想我需要在某种全球范围内“指向”my_folder,以查看全球分发列表,而不是我的个人联系人中的那些。

from exchangelib import DELEGATE, Account, Credentials, Configuration

credentials = Credentials(username='domain\\account', password='passw0rd')
config = Configuration(server='mail.example.com', credentials=credentials)
account = Account(primary_smtp_address='foo@example.com', config=config,
              autodiscover=False, access_type=DELEGATE)
my_folder = account.contacts
all_items_without_caching = my_folder.all().iterator()
for item in all_items_without_caching:
    print(item)

【问题讨论】:

  • 作为问题的更新回答。谢谢。

标签: python exchange-server


【解决方案1】:

exchangelib作者在这里:全局地址簿还没有在exchangelib中实现,不幸的是:https://github.com/ecederstrand/exchangelib/issues/93

编辑:GAL 文件夹和 FindPeople / GetPersona 服务现已实现,所以现在应该可以工作了。

【讨论】:

  • 啊,谢谢你告诉我。我应该看到这个未解决的问题。
猜你喜欢
  • 1970-01-01
  • 2011-09-13
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-05-10
  • 1970-01-01
  • 2010-11-07
  • 1970-01-01
相关资源
最近更新 更多