I'm trying to access and read "Shared Calendars" based on pyexchange and the following code:
from pyexchange import Exchange2010Service, ExchangeNTLMAuthConnection
from datetime import datetime
from pytz import timezone
#Connection
URL = 'https://<server name>/EWS/Exchange.asmx'
USERNAME = '<Domain>\\<User Name>'
PASSWORD = '<Your Password>'
# Set up the connection to Exchange
connection = ExchangeNTLMAuthConnection(url=URL,
username=USERNAME,
password=PASSWORD)
service = Exchange2010Service(connection)
# List all events from date to date
calendar_list = service.calendar().list_events(
start=timezone('Europe/Amsterdam').localize(datetime(2016, 6, 1)),
end=timezone('Europe/Amsterdam').localize(datetime(2016, 6, 30)),
details=True
)
for event in calendar_list.events:
print("{start} ------ {stop} ------ {subject}".format(
start=event.start,
stop=event.end,
subject=event.subject
))
Everything works great with my Calendar, but I don't know how to do the same for the 3 "Shared Calendars": Screenshot of my calendar view
Any idea how to list the 3 "Shared Calendars"? I'm using Outlook on a Mac.