EWS updating extended properties

This question is further to a thread I started last week regarding a distribution list created via EWS not being editable in OWA.  I found that if I added the property 0x3016 = True it would then work.  Now my task is to go through all previously created DLs (that don't have this property) and add the property.  I am doing this via UpdateItem.  I get no error, but it does not work - the new property is not added.  Below is an example of the XML I am using.  Any ideas?

<UpdateItem MessageDisposition="SaveOnly" ConflictResolution="AutoResolve" xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<ItemChanges>
<t:ItemChange>
<t:ItemId Id="AAMkADNjNjA1MTIxLWNlNmItNDBjMS04NWE0LTQ3ZmM0YTFiMTg4MABGAAAAAADzAjMnWlbcRo51UWjY2+udBwBtGm0AIaIyTp7trMMKSGyiAAAAzNL1AACxNOWmTuGVSbP5Z2FuqVoaAABiuTUZAAA=" ChangeKey="EgAAABYAAACxNOWmTuGVSbP5Z2FuqVoaAABiue7T"/>
<t:Updates>
<t:SetItemField>
<t:ExtendedFieldURI PropertyTag="0x3016" PropertyType="Boolean"/>
<t:Contact>
<t:ExtendedProperty>
<t:ExtendedFieldURI PropertyTag="0x3016" PropertyType="Boolean"/>
<t:Values>
<t:Value>true</t:Value>
</t:Values>
</t:ExtendedProperty>
</t:Contact>
</t:SetItemField>
</t:Updates>
</t:ItemChange>
</ItemChanges>
</UpdateItem>

August 5th, 2013 7:06pm

Are you updating a Contact or DistributionList, from your code it looks like your updating a Contact you should have something like

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <t:RequestServerVersion Version="Exchange2010_SP2" />
  </soap:Header>
  <soap:Body>
    <m:UpdateItem MessageDisposition="SaveOnly" ConflictResolution="AlwaysOverwrite">
      <m:ItemChanges>
        <t:ItemChange>
          <t:ItemId Id="AAMkAGJjNjU1ZDFhLTNjOTQtNDI4OC05ZmE4LTE0N2YzY2I5MGFiYgBGAAAAAABTBx5+NyjxRLVYRaynYRdDBwB76tPhixypSaiwXvsiZI9lAAAAAAEPAAB76tPhixypSaiwXvsiZI9lAAAH8JOyAAA=" ChangeKey="EgAAABYAAAB76tPhixypSaiwXvsiZI9lAAAH8SvL" />
          <t:Updates>
            <t:SetItemField>
              <t:ExtendedFieldURI PropertyTag="12310" PropertyType="Boolean" />
              <t:DistributionList>
                <t:ExtendedProperty>
                  <t:ExtendedFieldURI PropertyTag="12310" PropertyType="Boolean" />
                  <t:Value>true</t:Value>
                </t:ExtendedProperty>
              </t:DistributionList>
            </t:SetItemField>
          </t:Updates>
        </t:ItemChange>
      </m:ItemChanges>
    </m:UpdateItem>
  </soap:Body>
</soap:Envelope>
Cheers
Glen
Free Windows Admin Tool Kit Click here and download it now
August 6th, 2013 12:58am

Yes I had tried DistributionList, as well as Message, but no difference.  As an experiment I wrote some MAPI code to add the property.  This also fails (although the same code works fine against a .pst file).  So my theory is that there is something going on with the Exchange server that is preventing extended properties from being added after the initial creation of the item.

August 6th, 2013 10:15am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics