【问题标题】:EWS operation to edit Distribution list编辑分发列表的 EWS 操作
【发布时间】:2015-10-20 07:31:46
【问题描述】:

我正在寻找 EWS 操作来编辑分发列表。此处编辑的意思是,将现有联系人添加\删除到现有组中\或更改组的显示名称。

我已经尝试过以下链接中提到的选项:- https://social.msdn.microsoft.com/Forums/office/en-US/db110c4e-a0f2-40de-9276-3e30458b254f/ews-maximum-number-of-members-in-a-contact-group?forum=exchangesvrdevelopment

还使用了 AppendToItemField、SetItemField 和 DeleteItemField 等属性?但错误是“方法或操作未实现”

【问题讨论】:

  • 您使用的是什么版本的 Exchange?在 2010 年起,您应该使用 ContactGroup 操作。如果您需要帮助,还应该发布您使用的代码。
  • 我已尝试使用 Exchange 版本 2007 到 Exchange 2013。我还没有对 EWS 操作进行任何编码,我只是使用 SOAP xml 请求响应格式来查找地址簿组的合适匹配项EWS操作
  • 您需要使用 Exchange 2010,如果您使用 SOAP,则需要在标头中使用 versioing 来告诉服务器这是 2010 请求。
  • 是的,我在 EWS 标头中明确提到了服务器版本。但是没有用。但现在我找到了 1 种适合我的请求格式。一旦我彻底验证了所有操作,很快就会在这里发布相同的内容。感谢 Glen Scales 试图帮助我。

标签: exchangewebservices distribution-list


【解决方案1】:

最后我得到了编辑组的答案。这是对我有用的 SOAP 调用:-

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
  <soap:Header>
    <RequestServerVersion Version="Exchange2013" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" />
  </soap:Header>
  <soap:Body>
    <UpdateItem ConflictResolution="AutoResolve" MessageDisposition="SaveOnly" SendMeetingInvitationsOrCancellations="SendToNone" xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
      <ItemChanges>
        <t:ItemChange>
          <t:ItemId Id="AAMkADZmMjJlMDk...." ChangeKey="EgAAAB..." />
          <t:Updates>
            <t:AppendToItemField>
              <t:FieldURI FieldURI="distributionlist:Members" />
              <t:DistributionList>
                <t:Members>
                  <t:Member>
                    <t:Mailbox>
                      <t:ItemId Id="AAMkADZmMjJ..." ChangeKey="EQAAABYA..." />
                    </t:Mailbox>
                  </t:Member>
                  <t:Member>
                    <t:Mailbox>
                      <t:EmailAddress>user@contonso.com</t:EmailAddress>
                    </t:Mailbox>
                  </t:Member>
                </t:Members>
              </t:DistributionList>
            </t:AppendToItemField>
          </t:Updates>
        </t:ItemChange>
      </ItemChanges>
    </UpdateItem>
  </soap:Body>
</soap:Envelope>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-02-24
    • 1970-01-01
    • 2017-10-02
    • 1970-01-01
    • 2023-03-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多