none
Exchange 2010 EWS - Adding info to User Field 1 RRS feed

  • Question

  • I want to add a users Blackberry PIN number in "User Field 1." How would I do that in the xml code below?

      

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"> 
     <soap:Header> 
    <t:RequestServerVersion Version="Exchange2010"/> 
     <t:ExchangeImpersonation> 
     <t:ConnectingSID> 
     <t:PrimarySmtpAddress>rusty.burns@alston.com</t:PrimarySmtpAddress> 
     </t:ConnectingSID> 
     </t:ExchangeImpersonation> 
     </soap:Header> 
     <soap:Body> 
     <CreateItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" > 
     <SavedItemFolderId> 
     <t:DistinguishedFolderId Id="contacts"/> 
     </SavedItemFolderId> 
     <Items> 
     <t:Contact> 
      <t:FileAs>SampleContact</t:FileAs> 
      <t:GivenName>Tanja</t:GivenName> 
      <t:CompanyName>Blue Yonder Airlines</t:CompanyName> 
      <t:EmailAddresses> 
      <t:Entry Key="EmailAddress1">tplate@example.com</t:Entry> 
      </t:EmailAddresses> 
      <t:PhysicalAddresses> 
      <t:Entry Key="Business"> 
      <t:Street>1234 56th Ave</t:Street> 
      <t:City>La Habra</t:City> 
      <t:State>CA</t:State> 
      </t:Entry> 
      </t:PhysicalAddresses> 
      <t:PhoneNumbers> 
      <t:Entry Key="BusinessPhone">4255550199</t:Entry> 
      </t:PhoneNumbers> 
      <t:JobTitle>Manager</t:JobTitle> 
      <t:Surname>Plate</t:Surname> 
     </t:Contact> 
     </Items> 
     </CreateItem> 
     </soap:Body> 
    </soap:Envelope>


     

    Monday, August 8, 2011 1:45 PM

All replies

  • If your trying to use the Extension Attributes eg http://technet.microsoft.com/en-us/library/ee423541.aspx these aren't accessible using EWS you need to use either the Exchange Management Shell, LDAP (system.directoryservices) or Mapi (OOM, Extended Mapi). Otherwise you could create your own custom Mapi property and store that in the mailbox (eg maybe write it to the NON_IPM_Subtree). Depends what you need to use it for ?

    Cheers
    Glen

    Tuesday, August 9, 2011 5:25 AM
  • I was able to add a value to user field 2 using the xml below.

            <t:Contact>
                 <t:ExtendedProperty>
                      <t:ExtendedFieldURI PropertySetId="00062004-0000-0000-c000-000000000046" PropertyId="32848" PropertyType="String" />
                      <t:Value>my value</t:Value>
                </t:ExtendedProperty>
                <t:ExtendedProperty>
                <t:ExtendedFieldURI PropertySetId="00062004-0000-0000-c000-000000000046" PropertyId="32805" PropertyType="Boolean" />
                <t:Value>true</t:Value>
                </t:ExtendedProperty>

    Thursday, September 1, 2011 3:58 PM
  • Your refering to these properties http://msdn.microsoft.com/en-us/library/ee160396.aspx which you would only be able to set/get on contacts that where saved in Mapi/Exchange Contacts folder this wont work for GAL\Directory contacts which are readonly in this context.

    Cheers
    Glen

    Friday, September 2, 2011 2:57 AM