http://www.infini-tec.de/InfiniTec - Henning Krauses Blog - Constructing OWA 2007 item ids from WebDAV items2008-06-03T09:27:29+00:00Don't adjust your mind - it's reality that is malfunctioning Henning KrauseBlogEngine.Net Syndication Generatorhttp://www.infini-tec.de/opml.axdHenning KrauseDon't adjust your mind - it's reality that is malfunctioning en-USInfiniTec - Henning Krauses Blog 0.0000000.000000http://www.infini-tec.de/post/2007/03/24/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx#id_2a010eb0-63a0-474d-9858-62ae0a3b5700R. Frese on <a href="/post/2007/03/24/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx#id_2a010eb0-63a0-474d-9858-62ae0a3b5700" alt="/post/2007/03/24/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx#id_2a010eb0-63a0-474d-9858-62ae0a3b5700">Constructing OWA 2007 item ids from WebDAV items</a>2008-06-03T09:27:29+00:00R. FreseHello,
and for items in public folders - available since SP1 for Exchange 2007 - the url is again different, e.g.:
&amp;amp;#39;/owa/default.aspx?ae=Item&amp;amp;amp;amp;a=Open&amp;amp;amp;amp;t=IPM.note&amp;amp;amp;amp;id=PSI.LgAAAAAaRHOQqmYRzZvIAKoAL8RaAwCzfAxt%2fGC2SYdQnhZMvzCDAdVHEaWEAAAB.RgAAAAAaRHOQqmYRzZvIAKoAL8RaCQCzfAxt%2fGC2SYdQnhZMvzCDAdVHEaWEAACzfAxt%2fGC2SYdQnhZMvzCDAdVHEeJ%2bAAAA&amp;amp;#39;
where :
id=PSI.LgAAAAAaRHOQqmYRzZvIAKoAL8RaAwCzfAxt%2fGC2SYdQnhZMvzCDAdVHEaWEAAAB.RgAAAAAaRHOQqmYRzZvIAKoAL8RaCQCzfAxt%2fGC2SYdQnhZMvzCDAdVHEaWEAACzfAxt%2fGC2SYdQnhZMvzCDAdVHEeJ%2bAAAA
is the interisting part of the url.
For that url the function &amp;amp;amp;quot;CreateOwaUrl(string entryId, ItemType itemTypeId)&amp;amp;amp;quot; *fails*, cause the pub.fold url contains &amp;amp;amp;quot;.&amp;amp;amp;quot; (points), which aren&amp;amp;#39;t allowed characters for base64 encoding.
Exchange 2007 SP1 introduced the new functions to converting url from OWA to PR_ENTRYID as described in <a href="http://msdn.microsoft.com/en-us/library/bb856559(EXCHG.80).aspx" rel="nofollow">msdn.microsoft.com/.../bb856559(EXCHG.80).aspx</a>, but that doesn&amp;amp;#39;t work for public folders.
And the format of public folder urls are not described nowhere.
So, how is it possibel to get the properties of an item in a specific public folder via Exchange Web Service?
Any idea?
regards
R. Frese2008-06-03T09:27:29+00:00R. Fresehttp://www.infini-tec.de/pingback.axdhttp://www.infini-tec.de/post/2007/03/24/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx#id_2a010eb0-63a0-474d-9858-62ae0a3b5700http://www.infini-tec.de/post/2007/03/24/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx#id_2a010eb0-63a0-474d-9858-62ae0a3b5700#commenthttp://www.infini-tec.de/syndication.axd?post=2a010eb0-63a0-474d-9858-62ae0a3b5700http://www.infini-tec.de/post/2007/03/24/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx#id_d61ecfbb-d7b3-4f35-bcd6-0f9087abb7ffjpf on <a href="/post/2007/03/24/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx#id_d61ecfbb-d7b3-4f35-bcd6-0f9087abb7ff" alt="/post/2007/03/24/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx#id_d61ecfbb-d7b3-4f35-bcd6-0f9087abb7ff">Constructing OWA 2007 item ids from WebDAV items</a>2008-06-26T14:05:11+00:00jpfHi,
I currently use this kind of following url to link to &amp;amp;amp;quot;public folders&amp;amp;amp;quot; :
http(s)://&amp;amp;amp;lt;exchangeserver&amp;amp;amp;gt;/owa/?ae=Folder&amp;amp;amp;amp;id=PSF.&amp;amp;amp;quot; + &amp;amp;amp;lt;array-size = EntryId.length/2&amp;amp;amp;gt; + &amp;amp;amp;lt; Escape Hexa Base64 encoded entryid&amp;amp;amp;gt; + &amp;amp;amp;lt;something related to the folder (x13)&amp;amp;amp;gt;
<strong>Note</strong>: the type parameter is not mandatory (&amp;amp;amp;amp;t=IPN.Note) but it is easy to know it with the MAPIfolder.DefaultMessageClass property
if you got a entryid of 92 caracteres 00001A...., fill the array like this :
owaId[0] = x2E (92/2 = 46)
owaId[1] = x00
owaId[2] = x00
owaId[3] = x1A
...
don&amp;amp;#39;t forget to use System.Uri.EscapeDataString() or something else &amp;amp;#39;coz &amp;amp;amp;quot;+&amp;amp;amp;quot; caractere should be replace with %2B etc.
2008-06-26T14:05:11+00:00jpfhttp://www.infini-tec.de/pingback.axdhttp://www.infini-tec.de/post/2007/03/24/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx#id_d61ecfbb-d7b3-4f35-bcd6-0f9087abb7ffhttp://www.infini-tec.de/post/2007/03/24/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx#id_d61ecfbb-d7b3-4f35-bcd6-0f9087abb7ff#commenthttp://www.infini-tec.de/syndication.axd?post=d61ecfbb-d7b3-4f35-bcd6-0f9087abb7ffhttp://www.infini-tec.de/post/2007/03/24/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx#id_1547da54-feb6-400e-9696-931937eba4ef<a class="comment_auth" href="http://www.keyongtech.com/1209860-a-is-it-possible-to" alt="http://www.keyongtech.com/1209860-a-is-it-possible-to" title="http://www.keyongtech.com/1209860-a-is-it-possible-to">keyongtech.com</a> on <a href="/post/2007/03/24/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx#id_1547da54-feb6-400e-9696-931937eba4ef" alt="/post/2007/03/24/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx#id_1547da54-feb6-400e-9696-931937eba4ef">Constructing OWA 2007 item ids from WebDAV items</a>2009-01-18T23:09:21+00:00keyongtech.comPingback from keyongtech.com
&amp;amp;#194;&amp;amp;#191;Is it possible to create a contact in Exchange 2007 with webdav operations? | keyongtech2009-01-18T23:09:21+00:00keyongtech.comhttp://www.infini-tec.de/pingback.axdhttp://www.infini-tec.de/post/2007/03/24/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx#id_1547da54-feb6-400e-9696-931937eba4efhttp://www.infini-tec.de/post/2007/03/24/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx#id_1547da54-feb6-400e-9696-931937eba4ef#commenthttp://www.infini-tec.de/syndication.axd?post=1547da54-feb6-400e-9696-931937eba4efhttp://www.infini-tec.de/post/2007/03/24/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx#id_bb59c3e6-9606-4cb4-b82e-5a9089c21e02<a class="comment_auth" href="http://www.interacct.com.au/" alt="http://www.interacct.com.au/" title="http://www.interacct.com.au/">ZippyRainbow</a> on <a href="/post/2007/03/24/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx#id_bb59c3e6-9606-4cb4-b82e-5a9089c21e02" alt="/post/2007/03/24/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx#id_bb59c3e6-9606-4cb4-b82e-5a9089c21e02">Constructing OWA 2007 item ids from WebDAV items</a>2009-08-14T00:59:55+00:00ZippyRainbowHi,
I think I have basically got this sorted.. but I must be missing one step, as my ID is a little bit different to what the link is if I click on the Email under OWA Exchange 2007 SP1.
My Result should be : (As Copied from when I double click on the email in OWA)
https://sites/owa/?ae=Item&amp;amp;amp;amp;a=Open&amp;amp;amp;amp;t=IPM.Note&amp;amp;amp;amp;id=RgAAAADTZ%2fBDv0aiQLUOdKWZH5IqBwC%2bzheUSRzNRbQgVSZ558klAAqCGlP5AAC%2bzheUSRzNRbQgVSZ558klAAqorqGiAAAJ
But I Get : (From my VB.net Project)
https://sites/owa/?ae=Item&amp;amp;amp;amp;a=Open&amp;amp;amp;amp;t=IPM.Note&amp;amp;amp;amp;id=RgAAAADTZ%2fBDv0aiQLUOdKWZH5IqBwC%2bzheUSRzNRbQgVSZ558klAAqorWEfAAC%2bzheUSRzNRbQgVSZ558klAAqorqGiAAAJ
Note the Difference is in the Middle.. I am getting qorWEfAAC% and not qCGlP5AAC%
This is my Conversion Code for the EntryID... Converted into VB.net
Private Function CreateOwaUrl(ByVal entryId As String) As String
&amp;amp;#39;1.Load the entry id via WebDAV (PROPFIND or SEARCH on the item, get property <a href="http://schemas.microsoft.com/mapi/proptag/xfff0102" rel="nofollow">http://schemas.microsoft.com/mapi/proptag/xfff0102</a>).
Dim itemTypeId As Byte = 9 &amp;amp;#39;Normally a Message for me.
Dim binaryEntryId() As Byte
Dim result As String
&amp;amp;#39;2.Decode the BASE64 encoded entry id to a byte array (in .NET, use the Convert.FromBase64String() method)
binaryEntryId = Convert.FromBase64String(entryId)
&amp;amp;#39;3.Create a new byte array with the length of the entryid byte array plus 2
Dim owaId As Byte() = New Byte(binaryEntryId.Length + 1) {}
&amp;amp;#39;4.Write the length of the entry id in the first byte of the byte array
owaId(0) = CType(binaryEntryId.Length, Byte)
&amp;amp;#39;5.Copy the entry id to the new byte array, starting at offset 1
Array.Copy(binaryEntryId, 0, owaId, 1, binaryEntryId.Length)
&amp;amp;#39;6.Write the item type identifier into the last byte of the element ... Normally 9 for a Message
owaId((owaId.Length - 1)) = CType(itemTypeId, Byte)
&amp;amp;#39;7.Convert the byte array to a BAS64 encoded string (using Convert.ToBase64String() method)
result = Convert.ToBase64String(owaId)
&amp;amp;#39;8.Urlencode the string
result = System.Web.HttpUtility.UrlEncode(result)
Return result
End Function
2009-08-14T00:59:55+00:00ZippyRainbowhttp://www.infini-tec.de/pingback.axdhttp://www.infini-tec.de/post/2007/03/24/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx#id_bb59c3e6-9606-4cb4-b82e-5a9089c21e02http://www.infini-tec.de/post/2007/03/24/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx#id_bb59c3e6-9606-4cb4-b82e-5a9089c21e02#commenthttp://www.infini-tec.de/syndication.axd?post=bb59c3e6-9606-4cb4-b82e-5a9089c21e02