exchangewebservices之Exchange Web服务-获取所有可用的“ExtendedProperty”的列表

zhengyun_ustc 阅读:66 2025-05-04 20:05:19 评论:0

我有一个Exchange Server,其中包含带有自定义字段的项目(例如,具有自定义ExtendedProperty值的“联系人”和“事件”)。我正在寻找一种使用Exchange Web服务(EWS)显示这些字段的方法。

根据Microsoft documentation,有一种使用ExtendedProperty方法检索单个FindItem值的简单方法。例:

<?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" /> 
  </soap:Header> 
  <soap:Body> 
    <m:FindItem Traversal="Shallow"> 
      <m:ItemShape> 
        <t:BaseShape>AllProperties</t:BaseShape> 
        <t:AdditionalProperties> 
          <t:ExtendedFieldURI PropertySetId="c11ff724-aa03-4555-9952-8fa248a11c3e"  
             PropertyName="Expiration Date" PropertyType="String" /> 
        </t:AdditionalProperties> 
      </m:ItemShape> 
      <m:IndexedPageItemView MaxEntriesReturned="10" Offset="0" BasePoint="Beginning" /> 
      <m:ParentFolderIds> 
        <t:DistinguishedFolderId Id="inbox" /> 
      </m:ParentFolderIds> 
    </m:FindItem> 
  </soap:Body> 
</soap:Envelope>  

但是,这需要 PropertySetID以及 PropertyTypePropertyName。就我而言,我不知道可以使用哪些 PropertySetIDs,更不用说 PropertyTypePropertyName了。有没有办法获取所有可用的 扩展属性的列表?

请您参考如下方法:

无法获得扩展(自定义)属性的列表。我使用的是Independentsoft的API,他们告诉我,您必须知道(请求)要使用EWS检索哪些属性。


标签:webService
声明

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

关注我们

一个IT知识分享的公众号