首页 > 解决方案 > 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>

这里的预期实现是什么?我们是否应该在没有正确的扩展权限时收到更合适的错误消息,或者用户是否应该有能力扩展动态通讯组?

我们想知道如何处理这种情况,以便我们可以打印适当的错误或保持动态通讯组未扩展并按原样发送邮件合并。

标签: exchangewebservicesoffice-jsoutlook-web-addins

解决方案


我们的问题是,当我们使用对执行呼叫的用户隐藏的动态通讯组进行 ExpandDL 呼叫时

如果它是隐藏的,那么根据文档https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/expanddl-operation

该组不应该从地址列表中隐藏,并且每个成员都应该有一个非空的电子邮件地址。


推荐阅读