none
Exchange 2007SP1, EWS Managed API 1.0, C#: How do I retrieve attendee's response type for a generated Appointment?

    Question

  • I'm writing a web application that automatically creates an appointment and sends it to an auto-accepting resource (like a conference room).  I then need to know if the resource has accepted this appointment.  In the EWS Managed API, I've found the Attendee.ResponseType property.  It works, sort of.  When I have the organizer account open in Outlook and then run the appointment-creating code, the code correctly reports the response of the resource as Accept or Reject when I query it.  If I do not have Outlook open, the response type is Unknown until I open Outlook and query again.  It's as if Outlook is processing the Accept/Reject message from the resource, and not the Exchange server.  Is that the case?  Can someone point me to documentation on this issue?  (I can't find any.)  How do I correctly get the response from the resource without Outlook?
    Wednesday, January 12, 2011 11:14 PM

All replies

  • Can you get the item class?  I think that for responses, it begins with IPM.Schedule.Meeting.Resp , and ends with .Pos .Neg and .Tent for the various response types.
    Outlook Web Access For PDA , OWA For WAP
    www.owa-pda.com
    email a@t leederbyshire d.0.t c.0.m
    Thursday, January 13, 2011 4:22 PM
  • I'm not sure I understand your response.  Here's the code I'm running (based on the EWS Managed API):

    ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
    service.Credentials = credentials;
    service.Url = new Uri(serverURL + @"/EWS/Exchange.asmx");
    Appointment item = Appointment.Bind(service, id);
    
    if (item.RequiredAttendees[0].ResponseType != MeetingResponseType.Accept)
    {
      // not accepted - do something
    }
    else
    {
      // accpeted - do something else
    }
    

    However, the ResponseType is always Unknown.  If I open the organizer's account in Outlook, it processes the attendee's response message and updates the ResponseType.  Why doesn't the Exchange server do this?  How do I do it in my code?

    Thursday, January 13, 2011 5:33 PM
  • Ah, I thought the item you were looking at was the response, not the original appointment.  In that case, yes, I think you have to open the item in Outlook or OWA to process it.  One thing I used to do was to do a synthetic GET to the OWA URL that a real user requests when they open the response in OWA.  But that was in E2003, and I haven't needed to do it since.  It may be enough just to so a GetItem on the response item in EWS, but I've not tried it.

    I assumed you were looking at the response coming back from the recipient.  If you have that, you can tell whether they accepted, or not.  But not by looking at the original appointment until it's been opened in something.


    Outlook Web Access For PDA , OWA For WAP
    www.owa-pda.com
    email a@t leederbyshire d.0.t c.0.m
    Friday, January 14, 2011 1:56 PM
  • Joe - were you able to solve this problem?
    Tuesday, September 06, 2011 9:44 PM
  • Yes and no.  It's been a long time since I looked at it, so bear with me:

    I think I read somewhere that you must first request all the new items in the user's mailbox, then issue a request for the meeting and the response will be set correctly.

    My solution, before I read that, was to search for a response object in the mailbox that seemed to match the request.

    Good luck,

    Joe

    Tuesday, September 06, 2011 9:49 PM
  • Thanks Joe, did you ultimately stay with searching for the response object in the users mailbox?  
    Wednesday, September 07, 2011 4:34 AM
  • Yes, but only because it would be more work to go back and change it.  If I were starting over, I would try the other way first.
    Wednesday, September 07, 2011 3:27 PM
  • Has the current process been reliable? Have you run into any unexpected issues tracking meeting responses this way?

     

    Friday, September 16, 2011 8:13 PM
  • Hi Joe,

    Do you have a solution for this? I am still getting the response type as "unknown". Can you please let me know how I can do this "I think I read somewhere that you must first request all the new items in the user's mailbox, then issue a request for the meeting and the response will be set correctly."

    Thanks!


    Thanks Srijit

    Wednesday, July 18, 2012 8:04 PM
  • I got this resolved myself.. thanks..


    Thanks Srijit

    Wednesday, July 18, 2012 8:36 PM
  • SrijitCN - How did you end up resolving this?

    Wednesday, July 18, 2012 8:59 PM