Seph
Seph

Reputation: 8703

Accessing Shared Calendars with Exchange Web Services

I'm trying to access shared calendars from exchange using exchange web services, can someone provide me with info on how I can do this?

I have tried:

ExchangeService myService = new ExchangeService (ExchangeVersion.Exchange2007_SP1);
myService.Credentials = new NetworkCredential ("user@domain.com", "12345");

But I may not always have the passwords for these accounts and the account I'm logged into does has shared calendar access.

Upvotes: 3

Views: 3846

Answers (1)

Seph
Seph

Reputation: 8703

I have managed to get it working now

Dim _cal As New Microsoft.Exchange.WebServices.Data.FolderId(Microsoft.Exchange.WebServices.Data.WellKnownFolderName.Calendar, New Microsoft.Exchange.WebServices.Data.Mailbox(_otherAddress))
Dim _calendarView As New Microsoft.Exchange.WebServices.Data.CalendarView(_startTime.Date, _endTime.Date.AddDays(1))

For Each appointmentItem As Microsoft.Exchange.WebServices.Data.Appointment In _
    service.FindAppointments( _
    _cal, _
    _calendarView)
Next

Upvotes: 6

Related Questions