【发布时间】: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