calendar schedule request send to the user is accepted or not?

126 views Asked by At

I am working on schedule the resource in exchange server . I am able to get the user free/busy status using the c# code below

GetUserAvailabilityResults results = serviceData.GetUserAvailability(attendees,
    availabilityOptions.DetailedSuggestionsWindow,
    AvailabilityData.FreeBusyAndSuggestions,
    availabilityOptions);

And also able to send the scheduling request to the users

ExchangeService serviceData = (ExchangeService)Session["serviceData"];
Appointment appointment = new Appointment(serviceData);
appointment.Subject = model.Title;
appointment.Body = model.Description;
appointment.Start = model.Start;
appointment.End = model.End;
appointment.RequiredAttendees.Add(model.OwnerID);

appointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);

Now is it possible to check schedule request send to the user is accepted or not?

1

There are 1 answers

0
Glen Scales On

If you want to check the acceptance status of a Meeting you just need to iterate through the attendees collection of the Appointment object in the appointment owners calender eg

            foreach(Attendee attendee in aptobj.RequiredAttendees){
            if (attendee.ResponseType.HasValue)
            {
                Console.WriteLine(attendee.Address + " " + attendee.ResponseType.Value);
            }

        }
        foreach (Attendee attendee in aptobj.OptionalAttendees)
        {
            if (attendee.ResponseType.HasValue)
            {
                Console.WriteLine(attendee.Address + " " + attendee.ResponseType.Value);
            }
        }

Cheers Glen