exchangewebservices - ExpandDL 不适用于私有动态组
问题描述
我正在使用带有 Office.js 的 Outlook Web 加载项,它使用 EWS 来处理我们的部分邮件合并发送过程。我们发送使用通讯组列表和动态通讯组的邮件合并电子邮件。我们的问题是,当我们使用对执行呼叫的用户隐藏的动态通讯组进行 ExpandDL 呼叫时,我们会得到以下响应:
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" MajorVersion="15" MinorVersion="20" MajorBuildNumber="2220" MinorBuildNumber="22" Version="V2018_01_08"/>
</s:Header>
<s:Body>
<m:ExpandDLResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:ExpandDLResponseMessage ResponseClass="Error">
<m:MessageText>No results were found.</m:MessageText>
<m:ResponseCode>ErrorNameResolutionNoResults</m:ResponseCode>
<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
</m:ExpandDLResponseMessage>
</m:ResponseMessages>
</m:ExpandDLResponse>
</s:Body>
</s:Envelope>
这是我们用来调用 ExpandDL 的示例请求肥皂,其中
example-DDG@example.com
是一个隐藏/私有的动态分发组,请求此调用的用户无权查看它。
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<RequestServerVersion xmlns="http://schemas.microsoft.com/exchange/services/2006/types" Version="Exchange2013" soap:mustUnderstand="0"/>
</soap:Header>
<soap:Body>
<m:ExpandDL>
<m:Mailbox>
<t:EmailAddress>example-DDG@example.com</t:EmailAddress>
</m:Mailbox>
</m:ExpandDL>
</soap:Body>
</soap:Envelope>
这里的预期实现是什么?我们是否应该在没有正确的扩展权限时收到更合适的错误消息,或者用户是否应该有能力扩展动态通讯组?
我们想知道如何处理这种情况,以便我们可以打印适当的错误或保持动态通讯组未扩展并按原样发送邮件合并。
解决方案
我们的问题是,当我们使用对执行呼叫的用户隐藏的动态通讯组进行 ExpandDL 呼叫时
如果它是隐藏的,那么根据文档https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/expanddl-operation
该组不应该从地址列表中隐藏,并且每个成员都应该有一个非空的电子邮件地址。
推荐阅读
- pandas - 如何避免 df.apply 运行两次顶行
- php - preg_split() 期望参数 2 是字符串,给定对象
- log4net - 此平台不支持 log4net Windows 主体功能。使用 WSL2
- php - 如何在我的 wp_query() 循环中显示我的 meta_key 值
- git - 估计版本 0.1.0-beta.1 是(并且不能是)低于基本版本 1.4.0-beta.x
- mediawiki - 将 Javascript 代码(嵌入表单代码)添加到 Mediawiki 页面
- gem5 - 如何在 gem5 中使用时间戳跟踪已执行的来宾函数符号名称?
- gradle - 带有 Cucumber Gradle 的 TestNG,无法从命令行覆盖 cucumberoptions
- c# - 二维轨迹路径与 Unity 中的对象路径不匹配
- html - 即使删除任何 HTML DOM 元素,如何保持固定布局