Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exchange Web Services - Create appointment with resource but attendees cannot see resource

I'm trying to play around with Exchange in order to integrate a room booking system with it.

I've created a room mailbox and have set it so that it auto-accepts appointment requests.

When creating an appointment as a standard user I can add the room as a resource and its availability will display. If I book it then it books successfully.

I've created an appointment via Exchange Web Services with room as a resource. The resource was successfully booked (as confirmed when opening it as the room's delegate) but it does not appear on the meeting as viewed by any of the attendees.

        var service = new ExchangeService(ExchangeVersion.Exchange2007_SP1) {
            Credentials =
                new NetworkCredential("username", "password", "domain"),
            Url = new Uri("https://myexchangeserver.co.uk/EWS/Exchange.asmx")
        };

         var appointment = new Appointment(service)
                              {
                                  Subject = "Created by ExchangeTest app",
                                  Body = "Some body text....",
                                  Start = startTime,
                                  End = endTime
                              };
        appointment.RequiredAttendees.Add("[email protected]");
        appointment.Resources.Add("[email protected]");
        appointment.Save(SendInvitationsMode.SendOnlyToAll);

Any ideas as to why it's not displaying as it would if I'd booked it manually?

As a side note I'm not actually able to view the calendar for this room as any user other than a delegate for it; it says the folder cannot be found.

like image 895
David Neale Avatar asked Nov 19 '10 11:11

David Neale


1 Answers

I'm not totally sure about your main problem.

About the side note though:

Have you tried searching your appointments?

FolderId folder = new FolderId(WellknownFolderName.Calendar,"[email protected]");
CalendarView calendarView = new CalendarView(startDate, endDate);

foreach (Appointment exchangeAppointment in service.FindAppointments(folder, calendarView))
{
    // Here you should be able to get access on the appointments at the specified folder & address
}
like image 166
Jermay Avatar answered Oct 04 '22 03:10

Jermay