AddImGroup operation
Find information about the AddImGroup EWS operation.
The AddImGroup Exchange Web Services (EWS) operation adds a new instant messaging (IM) group to a mailbox.
This operation was introduced in Exchange Server 2013.
Using the AddImGroup operation
The AddImGroup operation only takes a single display name argument.
This operation returns the display name, group type, and Exchange store identifier of the new group.
The AddImGroup operation can use the SOAP headers that are listed in the following table.
Table 1. AddImGroup 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. |
AddImGroup operation request example: Create a new IM group
The following example of an AddImGroup operation request shows how to create an IM group named MyCustomerGroup.
<?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:AddImGroup>
<m:DisplayName>MyCustomGroup</m:DisplayName>
</m:AddImGroup>
</soap:Body>
</soap:Envelope>
The request SOAP body contains the following elements:
Successful AddImGroup operation response
The following example shows a successful response to an AddImGroup operation request.
<?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">
<AddImGroupResponse ResponseClass="Success"
xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<ResponseCode>NoError</ResponseCode>
<ImGroup>
<DisplayName xmlns="http://schemas.microsoft.com/exchange/services/2006/types">MyCustomGroup</DisplayName>
<GroupType xmlns="http://schemas.microsoft.com/exchange/services/2006/types">IPM.DistList.MOC.UserGroup</GroupType>
<ExchangeStoreId Id="AAMkAGQ1MjJjMTBkLTc4Y2UtNDA5Ny04ZjU5LWI3MAAA="
ChangeKey="EgAAAA=="
xmlns="http://schemas.microsoft.com/exchange/services/2006/types"/>
</ImGroup>
</AddImGroupResponse>
</s:Body>
</s:Envelope>
The response SOAP body contains the following elements:
AddImGroup operation error response
The following example shows an error response to an AddImGroup operation request. This is a response to a request that contains a character that cannot be used in a display name. Note that this is a SOAP fault and not a schema-based error message. The display name submitted in the request is ~!@#$%^&, and the error occurs on the & character. The & character occurred on the 11th line and 33rd character in the request payload. The response was returned with an HTTP 500 code.
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorSchemaValidation</faultcode>
<faultstring xml:lang="en-US">The request failed schema validation: An error occurred while parsing EntityName. Line 11, position 33.</faultstring>
<detail>
<e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorSchemaValidation</e:ResponseCode>
<e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">The request failed schema validation.</e:Message>
<t:MessageXml xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<t:LineNumber>11</t:LineNumber>
<t:LinePosition>33</t:LinePosition>
<t:Violation>An error occurred while parsing EntityName. Line 11, position 33.</t:Violation>
</t:MessageXml>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>