0
votes

I am using EWS Managed API 2.0 to send the meeting invitation and capture the user response.

I have followed the reference from official website https://msdn.microsoft.com/en-us/library/office/jj220499(v=exchg.80).aspx and https://msdn.microsoft.com/en-us/library/office/dd633661(v=exchg.80).aspx. I, am getting an error as Id is malformed.

I have used the exact code in the official website. I did some googling and found that if id has special character this error may appear. But the id I provided has no special character its just a simple character.

Here is the code

ServicePointManager.ServerCertificateValidationCallback = CertificateValidationCallBack;
            ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
            service.Credentials = new WebCredentials("********@live.com", "************");

            service.TraceEnabled = true;
            service.TraceFlags = TraceFlags.All;

            service.AutodiscoverUrl("***********@live.com", RedirectionUrlValidationCallback);

            // Create the appointment.

            Appointment appointment = Appointment.Bind(service, "AAMkA=");


            // Set properties on the appointment. Add two required attendees and one optional attendee.
            appointment.Subject = "Status Meeting";
            appointment.Body = "The purpose of this meeting is to discuss status.";
            appointment.Start = new DateTime(2009, 3, 1, 9, 0, 0);
            appointment.End = appointment.Start.AddHours(2);
            appointment.Location = "Conf Room";
            appointment.RequiredAttendees.Add("***********@live.com");

            // Send the meeting request to all attendees and save a copy in the Sent Items folder.
            appointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);

            foreach (Attendee t in appointment.RequiredAttendees)
            {
                if (t.ResponseType != null)
                    Console.WriteLine("Required attendee - " + t.Address + ": " + t.ResponseType.Value.ToString());
            }

Getting an error in Appointment appointment = Appointment.Bind(service, "AAMkA=");The id is malfunction.

id as malfunction

1

1 Answers

0
votes

Exchange server will provide a unique Id on creating the appointment. So need to save the Id and pass the same Id when fetching the user response.

var Id = appointment.Id;

So pass the Id to fetch in the response.