RemoveDistributionGroupFromImList operation

Find information about the RemoveDistributionGroupFromImList EWS operation.

The RemoveDistributionGroupFromImList operation removes a distribution group from the Lync instant messaging (IM) list when Lync uses Exchange for the contact store.

This operation was introduced in Exchange Server 2013.

Using the RemoveDistributionGroupFromImList operation

The RemoveDistributionGroupFromImList operation accepts a single argument that identifies a distribution group to remove from the Lync IM list stored on an Exchange server.

RemoveDistributionGroupFromImList operation SOAP headers

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

Header name Element Description
Impersonation
ExchangeImpersonation
Identifies the user whom the client application is impersonating. This header 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 header is applicable to a request.
RequestVersion
RequestServerVersion
Identifies the schema version for the operation request. This header is applicable to a request.
ServerVersion
ServerVersionInfo
Identifies the version of the server that responded to the request. This header is applicable to a response.

RemoveDistributionGroupFromImList operation request example: Remove a distribution group from an IM list

The following example of a RemoveDistributionGroupFromImList operation request shows how to remove a distribution group from an IM group. The RemoveDistributionGroupFromImList operation accepts the unique group identifier to identify the distribution group to remove from the IM list. The ExchangeStoreId element that is returned in the response for the GetImItemList operation and the AddDistributionGroupToImList operation identifies distribution groups that can be removed from the IM list.

Note

All item identifiers and change keys in this article have been shortened to preserve readability.

<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:RemoveDistributionGroupFromImList>
         <m:GroupId Id="AAMkADEzO4QrAABmEh5oAAA="/>
      </m:RemoveDistributionGroupFromImList>
   </soap:Body>
</soap:Envelope>

The following elements are used in the request SOAP body:

Successful RemoveDistributionGroupFromImList operation response

The following example shows a successful response to a RemoveDistributionGroupFromImList operation request to a remove a distribution group from an IM group.

<?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="556" 
                           MinorBuildNumber="8" 
                           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">
      <RemoveDistributionGroupFromImListResponse ResponseClass="Success" 
                                                 xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
         <ResponseCode>NoError</ResponseCode>
      </RemoveDistributionGroupFromImListResponse>
   </s:Body>
</s:Envelope>

The following elements are used in the response SOAP body:

RemoveDistributionGroupFromImList operation error response example

The following example shows an error response to a RemoveDistributionGroupFromImList operation request. This is a response to a request to remove a distribution group that has already been removed from the mailbox.

<?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="556" 
                           MinorBuildNumber="8" 
                           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">
      <RemoveDistributionGroupFromImListResponse ResponseClass="Error" 
                                                 xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
         <MessageText>The specified object was not found in the store.</MessageText>
         <ResponseCode>ErrorItemNotFound</ResponseCode>
         <DescriptiveLinkKey>0</DescriptiveLinkKey>
      </RemoveDistributionGroupFromImListResponse>
   </s:Body>
</s:Envelope>

The following elements are used in the error response SOAP body:

See also