Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

AddDistributionGroupToImList operation

Exchange Server 2013

Published: July 16, 2012

Find information about the AddDistributionGroupToImList EWS operation.

Applies to:  Exchange 2013 | Exchange Online | Office 365 

The AddDistributionGroupToImList Exchange Web Services (EWS) operation adds a distribution group to the instant messaging (IM) list in the Unified Contact Store.

This operation was introduced in Exchange Server 2013.

The AddDistributionGroupToImList operation takes a single argument that identifies a distribution group to add to the IM list. This operation does not create a distribution group; the distribution group must already be created.

This operation can use the SOAP headers that are listed in the following table.

Table 1.  AddDistributionGroupToImList operation SOAP headers

Header name

Element

Description

Impersonation

ExchangeImpersonation

Identifies the user whom the client application is impersonating. This is applicable to a request.

MailboxCulture

MailboxCulture

Identifies the culture, as defined in RFC 3066, "Tags for the Identification of Languages", to be used to access the mailbox. This is applicable to a request.

RequestVersion

RequestServerVersion

Identifies the schema version for the operation request. This is applicable to a request.

ServerVersion

ServerVersionInfo

Identifies the version of the server that responded to the request. This is applicable to a response.

The following example of an AddDistributionGroupToImList operation request shows how to add a distribution group to the IM list.

<?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"
               xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">
   <soap:Header>
      <t:RequestServerVersion Version="Exchange2013" />
      <t:MailboxCulture>en-US</t:MailboxCulture>
   </soap:Header>
   <soap:Body >
      <m:AddDistributionGroupToImList>
         <m:SmtpAddress>distributionlist1@example.com</m:SmtpAddress>
      </m:AddDistributionGroupToImList>
   </soap:Body>
</soap:Envelope>

The request SOAP body contains the following elements:

The following example shows a successful response to an AddDistributionGroupToImList operation request.

The successful response contains the distribution group display name, the Exchange store class for the distribution group, and the EWS identifier of the new distribution group.

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="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">
   <s:Header>
      <t:ServerVersionInfo MajorVersion="15" 
                           MinorVersion="0" 
                           MajorBuildNumber="349" 
                           MinorBuildNumber="0" 
                           Version="Exchange2013"/>
   </s:Header>
   <s:Body>
      <m:AddDistributionGroupToImListResponse ResponseClass="Success">
         <m:ResponseCode>NoError</m:ResponseCode>
         <m:ImGroup>
            <t:DisplayName>distributionlist1@example.com</t:DisplayName>
            <t:GroupType>IPM.DistList.MOC.DG</t:GroupType>
            <t:ExchangeStoreId Id="AAMkAGQ1MjJjAA=" 
                             ChangeKey="EgAAAA=="/>
      </m:ImGroup>
      </m:AddDistributionGroupToImListResponse>
   </s:Body>
</s:Envelope>

The response SOAP body contains the following elements:

The following example shows an error response to an AddDistributionGroupToImList operation request. The following error response occurs when an attempt is made to add a distribution group that does not exist in the Exchange store.

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Header>
      <h:ServerVersionInfo MajorVersion="15" 
                           MinorVersion="0" 
                           MajorBuildNumber="349" 
                           MinorBuildNumber="0" 
                           Version="Exchange2013" 
                           xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" 
                           xmlns="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"/>
   </s:Header>
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
           xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <AddDistributionGroupToImListResponse ResponseClass="Error" 
                                            xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
         <MessageText>The specified IM distribution group SMTP address is invalid.</MessageText>
         <ResponseCode>ErrorInvalidImDistributionGroupSmtpAddress</ResponseCode>
         <DescriptiveLinkKey>0</DescriptiveLinkKey>
      </AddDistributionGroupToImListResponse>
   </s:Body>
</s:Envelope>

The error response SOAP body contains the following elements:

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.