Using exchangelib, how do you get a list of the members of a Global Distribution List? In the included test case I see how to create and delete a DL within a folder in your Contacts, but not referencing a global DL. I'm open to using a different Python library if necessary.
Update: Here's what I have tried so far. Using this code I'm able to dump a list of my personal Distribution Lists (and other contacts) including the members. I'm thinking I need to "point" my_folder
at some sort of global scope to see global Distribution Lists as opposed to those in my personal Contacts.
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)