none
EWS Managed Api 2.2 equivalent code for searching calendar item via ical uid RRS feed

  • Question

  • We need to query exchange for calendar items through their uid. I found a post related to this question. And that linked me to the following blog post:

    http://www.infinitec.de/post/2009/04/13/Searching-a-meeting-with-a-specific-UID-using-Exchange-Web-Services-2007.aspx

    However, stuff written there was written for an older version of the ews api (or some obsolete library(?)). I am trying to understand how to do the same thing using the latest ews managed api (v 2.2).

    Can anyone guide me?


    I am a bundle of mistakes intertwined together with good intentions

    Monday, August 1, 2016 9:56 AM

All replies

  • Thanks Glen, 

    But I doubt this approach will work. In my app, I get an email with reference to the room/resource that is booked. That email usually has the icalendar item attached in it. I usually retrieve the uid out of it. Because that is all I have to work with. Then I go on and check exchange if that meeting is confirmed. 

    Is there a way I can get this CleanObjectId as part of the email? Or can we create this uid somehow? (Like mentioned in the blog post)?


    I am a bundle of mistakes intertwined together with good intentions

    Tuesday, August 2, 2016 4:49 AM
  • >>Is there a way I can get this CleanObjectId as part of the email?

    Yes it all ready there all invitations, updates, acceptances, cancelations have the CleanObjectId property set on them (first step would be to check the email with a Mapi editor) this is the property that Outlook uses to correlate meeting requests so you don't need to create any other id's. It should be very easy for you to test all you need to do is request that property when you access the email my suggestion would be you try writing some code yourself and post that and I can help you if it doesn't work.

    Cheers
    Glen

    Wednesday, August 3, 2016 2:18 AM
  • The CleanObjectId isn't part of the raw email. And I am not sure how to make use of a mapi editor? This is a third party tool (by MS). I want the functionality you said in my application itself (which is capable of receiving an email). 

    I couldn't find the download link to that tool either. So please advise here. 


    I am a bundle of mistakes intertwined together with good intentions

    Monday, August 8, 2016 4:45 AM
  • >>The CleanObjectId isn't part of the raw email

    Yes is it but if your just looking at the MimeContent you won't see it you need to access it as an extended property, as I mentioned your much better posting the code your using or create a simple test application (or if you haven't written any code now is the time to start else you won't understand what I'm posting)

    >>And I am not sure how to make use of a mapi editor

    Look at mfcMapi or OutlookSpy

    Cheers
    Glen

    Tuesday, August 9, 2016 2:11 AM
  • Hi Glen, 

    I guess we are drifting in different directions here. I am stating this so we are hopefully on the same page. I have written a SMTP server which receives/stores email. This is the email I've to work with. (In other words, this email is my input). I am not retrieving that email via the ews api. (In which case I believe you can obtain the CleanObjectId like you said). Here is a sample of an email I get via my smtp server. 

    I am directly able to grab the uid of the embedded calendar item from that email. My original question was how to use that as input to query exchange for that item via the ews managed api?


    I am a bundle of mistakes intertwined together with good intentions

    Tuesday, August 9, 2016 6:16 AM
  • >>I have written a SMTP server which receives/stores email

    Okay but this is Exchange forum so you will find people in here that can help you with Exchange specific issues

    >> I am not retrieving that email via the ews api

    Okay so what API are you using ? what's you actual question ? your question states EWS Managed API (my answer in the link posted is for the EWS Managed API)

    I know I keep repeating this but post your code that a pretty universal language that tells anybody reading it what you are doing what API your using what server etc.

    In the example email you posted the UID in the Ical file

    040000008200E00074C5B7101A82E00800000000E0E5558620ECD101000000000000000010000000EC88C264C1D1124AAA33CDA662C7C6F0

    is the PidLidGlobalObjectId https://msdn.microsoft.com/en-us/library/ee157690(v=exchg.80).aspx eg 040000008200E00074C5B7101A82E008 is

    "Byte Array ID (16 bytes):  An array of 16 bytes identifying this BLOB as a Global Object ID. The byte array MUST be as follows: 0x04, 0x00, 0x00, 0x00, 0x82, 0x00, 0xE0, 0x00, 0x74, 0xC5, 0xB7, 0x10, 0x1A, 0x82, 0xE0, 0x08." etc

    The reason this ID is important is because that is what Outlook uses to correlate appointments

    Wednesday, August 10, 2016 2:54 AM