GetHoldOnMailboxes operation
Find information about the GetHoldOnMailboxes EWS operation.
Last modified: November 30, 2012
Applies to: Exchange Online | Exchange Server 2013 | Office 365
In this article
Using the GetHoldOnMailboxes operation
GetHoldOnMailboxes operation request example: Get mailbox hold information
Successful GetHoldOnMailboxes operation response
GetHoldOnMailboxes operation error response
Additional resources
The GetHoldOnMailboxes operation gets the mailboxes that are under a specific hold and the associated hold query.
This operation was introduced in Exchange Server 2013.
The GetHoldOnMailboxes operation gives the client information about which mailboxes are placed under a specific hold, information about the hold query associated with each hold, if applicable, and information about the hold status for each mailbox. For more information about mailbox holds, including query-based holds, see In-Place Hold on TechNet.
GetHoldOnMailboxes operation SOAP headers
The GetHoldOnMailboxes operation can use the SOAP headers that are listed in the following table.
|
Header name |
Element |
Description |
|---|---|---|
|
ManagementRole |
Identifies the server roles that are necessary in order for the caller to make the request. This header is applicable to a request. |
|
|
RequestVersion |
Identifies the schema version for the operation request. This header is applicable to a request. |
|
|
ServerVersion |
Identifies the version of the server that responded to the request. This header is applicable to a response. |
The following example of a GetHoldOnMailboxes operation request shows how to get the mailbox hold information for the HoldId2 mailbox hold.
<?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" />
</soap:Header>
<soap:Body >
<m:GetHoldOnMailboxes>
<m:HoldId>HoldId2</m:HoldId>
</m:GetHoldOnMailboxes>
</soap:Body>
</soap:Envelope>
The request SOAP body contains the following elements:
The following example shows a successful response to a GetHoldOnMailboxes operation request to get the mailbox hold information for the HoldId2 mailbox hold.
<?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="526"
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">
<GetHoldOnMailboxesResponse ResponseClass="Success"
xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<ResponseCode>NoError</ResponseCode>
<MailboxHoldResult>
<HoldId xmlns="http://schemas.microsoft.com/exchange/services/2006/types">HoldId2</HoldId>
<Query xmlns="http://schemas.microsoft.com/exchange/services/2006/types">test</Query>
<MailboxHoldStatuses xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<MailboxHoldStatus>
<Mailbox>/o=First Organization/ou=Exchange Administrative Group (FYDIBPDLT)/cn=Recipients/cn=ecc0fd98c2cadf-Willi</Mailbox>
<Status>OnHold</Status>
<AdditionalInfo/>
</MailboxHoldStatus>
<MailboxHoldStatus>
<Mailbox>/o=First Organization/ou=Exchange Administrative Group (FYDIBPDLT)/cn=Recipients/cn=dasdat341q8de95-Micha</Mailbox>
<Status>OnHold</Status>
<AdditionalInfo/>
</MailboxHoldStatus>
</MailboxHoldStatuses>
</MailboxHoldResult>
</GetHoldOnMailboxesResponse>
</s:Body>
</s:Envelope>
The response SOAP body contains the following elements:
The following example shows an error response to a GetHoldOnMailboxes operation request. This is a response to a request to get a hold that has been deleted.
<?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="526"
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">
<GetHoldOnMailboxesResponse ResponseClass="Error"
xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<MessageText>The specific query-based hold is not found.</MessageText>
<ResponseCode>ErrorMailboxHoldNotFound</ResponseCode>
<DescriptiveLinkKey>0</DescriptiveLinkKey>
</GetHoldOnMailboxesResponse>
</s:Body>
</s:Envelope>
The error response SOAP body contains the following elements:
For additional error codes that are generic to EWS and specific to this operation, see ResponseCode.