Exchange EWS 'HasAttachment' 属性 即使附件存在也返回 False

Exchange EWS 'HasAttachment' property returning False even if attachment exists

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

我也可以在 Postman 中复制它。调用 GetItem 请求(见下文)将 return 所有项目数据,但资源帐户中不存在 AttachmentId。我的用户帐户上的相同请求会 return AttachmentId。在资源帐户上调用时,HasAttachments 字段也显示 False。

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

获取项目:

<?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 也不显示附件。共享日历帐户可以不接受附件吗?

s there some property or value that I'm missing for the Resource account?

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

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

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