【问题标题】:Exchange EWS 'HasAttachment' property returning False even if attachment exists即使附件存在,Exchange EWS 'HasAttachment' 属性也会返回 False
【发布时间】:2017-06-14 09:02:37
【问题描述】:

我正在编写一个脚本,该脚本使用 Exchange EWS API 将日历上的附件保存到本地文件中。当我在任何用户帐户上执行此操作时,它都可以正常工作,但是,当我尝试在共享资源帐户上使用它时,它会失败。

我也可以在 Postman 中重现这一点。调用 GetItem 请求(见下文)将返回所有项目数据,但资源帐户上不存在 AttachmentId。我的用户帐户上的相同请求确实返回了 AttachmentId。 HasAttachments 字段在资源帐户上调用时也会显示 False。

Resource 帐户是否缺少某些属性或值?

获取项目:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
  xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">
<soap:Header>
    <t:RequestServerVersion Version="Exchange2007_SP1" />
</soap:Header>
  <soap:Body>
    <m:GetItem>
      <m:ItemShape>
        <t:BaseShape>AllProperties</t:BaseShape>
        <t:AdditionalProperties>
          <t:FieldURI FieldURI="item:Attachments" />
          <t:FieldURI FieldURI="item:HasAttachments" />
        </t:AdditionalProperties>
      </m:ItemShape>
      <ItemIds>
        <t:ItemId Id="AAAlAF..." ChangeKey="CQAAAB..." />
      </ItemIds>
     </m:GetItem>
   </soap:Body>
</soap:Envelope>

编辑:这绝对是帐户本身的问题,因为 OWA 也不显示附件。共享日历帐户可以不接受附件吗?

【问题讨论】:

    标签: xml soap wsdl exchange-server exchangewebservices


    【解决方案1】:

    Resource 帐户是否缺少某些属性或值?

    如果这是一个自动接受会议的资源邮箱,那么出于安全原因,邮箱的默认配置是删除附件。

    “DeleteAttachments 参数指定是否从所有传入邮件中删除附件。此参数的有效输入为 $true 或 $false。默认值为 $true。 此参数仅用于 AutomateProcessing 参数设置为 AutoAccept 的资源邮箱。"

    回复https://technet.microsoft.com/en-us/library/dd335046(v=exchg.160).aspx

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-09-25
      • 2012-05-13
      • 2015-05-26
      • 1970-01-01
      • 2021-11-30
      相关资源
      最近更新 更多