SetHoldOnMailboxes 操作

重要

2020 年 4 月 1 日から、SetHoldOnMailboxes 操作はExchange Onlineでは使用できなくなります。 この操作は、オンプレミスバージョンのExchange Serverでは影響を受けることはありません。 詳細については、「Exchange Onlineの従来の電子情報開示ツールの廃止」を参照してください。

SetHoldOnMailboxes EWS 操作に関する情報を確認します。

SetHoldOnMailboxes 操作は、メールボックスに対してメールボックスホールド ポリシーを設定します。

この操作は Exchange Server 2013 で導入されました。

SetHoldOnMailboxes 操作の使用

SetHoldOnMailboxes 操作は、メールボックスの保留を 1 つ以上のメールボックスに設定します。

SetHoldOnMailboxes 操作 SOAP ヘッダー

SetHoldOnMailboxes 操作では、次の表に示す SOAP ヘッダーを使用できます。

ヘッダー名 要素 説明
ManagementRole
ManagementRole
呼び出し元が要求を行うために必要なサーバー ロールを識別します。 このヘッダーは、要求に適用できます。
RequestVersion
RequestServerVersion
操作要求のスキーマ バージョンを識別します。 このヘッダーは、要求に適用できます。
ServerVersion
ServerVersionInfo
要求に応答したサーバーのバージョンを識別します。 このヘッダーは、応答に適用できます。

SetHoldOnMailboxes 操作要求の例: メールボックスにホールドを適用する

SetHoldOnMailboxes 操作要求の次の例は、2 つのメールボックスにホールドを適用する方法を示しています。 メールボックスホールドは 、New-MailboxSearch コマンドを使用して作成されました。

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
               xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">
   <soap:Header>
      <t:RequestServerVersion Version="Exchange2013" />
   </soap:Header>
   <soap:Body >
      <m:SetHoldOnMailboxes>
         <m:ActionType>Create</m:ActionType>
         <m:HoldId>HoldId2</m:HoldId>
         <m:Query>test</m:Query>
         <m:Mailboxes>
            <t:String>/o=First/ou=Exchange(DLT)/cn=Recipients/cn=1fa441ff5e4749ba43ecc0fd94c21adf-Willi</t:String>
            <t:String>/o=First/ou=Exchange(DLT)/cn=Recipients/cn=aed2346adaa34ffc9f0f339917e8de95-Micha</t:String>
         </m:Mailboxes>
         <m:Language>English</m:Language>
         <m:IncludeNonIndexableItems>false</m:IncludeNonIndexableItems>
         <m:Deduplication>true</m:Deduplication>
      </m:SetHoldOnMailboxes>
   </soap:Body>
</soap:Envelope>

要求 SOAP 本文には、次の要素が含まれています。

SetHoldOnMailboxes 操作の応答が成功しました

次の例は、2 つのメールボックスを保留にする SetHoldOnMailboxes 操作要求に対する正常な応答を示しています。

<?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="https://schemas.microsoft.com/exchange/services/2006/types" 
                           xmlns="https://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">
      <SetHoldOnMailboxesResponse ResponseClass="Success" 
                                  xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
         <ResponseCode>NoError</ResponseCode>
         <MailboxHoldResult>
            <HoldId xmlns="https://schemas.microsoft.com/exchange/services/2006/types">HoldId2</HoldId>
            <Query xmlns="https://schemas.microsoft.com/exchange/services/2006/types">test</Query>
            <MailboxHoldStatuses xmlns="https://schemas.microsoft.com/exchange/services/2006/types">
               <MailboxHoldStatus>
                  <Mailbox>o=First/ou=Exchange(DLT)/cn=Recipients/cn=1fa441ff5e4749ba43ecc0fd94c21adf-Willi</Mailbox>
                  <Status>Pending</Status>
                  <AdditionalInfo/>
               </MailboxHoldStatus>
               <MailboxHoldStatus>
                  <Mailbox>/o=First/ou=Exchange(DLT)/cn=Recipients/cn=aed2346adaa34ffc9f0f339917e8de95-Micha</Mailbox>
                  <Status>Pending</Status>
                  <AdditionalInfo/>
               </MailboxHoldStatus>
            </MailboxHoldStatuses>
         </MailboxHoldResult>
      </SetHoldOnMailboxesResponse>
   </s:Body>
</s:Envelope>

応答 SOAP 本文には、次の要素が含まれています。

SetHoldOnMailboxes 操作エラー応答

次の例は、 SetHoldOnMailboxes 操作要求に対するエラー応答を示しています。 これは、正しく指定されていないメールボックス識別子を含む要求に対する応答です。

<?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="https://schemas.microsoft.com/exchange/services/2006/types" 
                           xmlns="https://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">
      <SetHoldOnMailboxesResponse ResponseClass="Error" 
                                  xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
         <MessageText>No mailbox is specified for hold operation. If specified in the request, then it could be the object does not exist in AD or is a Distribution Group.</MessageText>
         <ResponseCode>ErrorInvalidOperation</ResponseCode>
         <DescriptiveLinkKey>0</DescriptiveLinkKey>
      </SetHoldOnMailboxesResponse>
   </s:Body>
</s:Envelope>

エラー応答 SOAP 本文には、次の要素が含まれています。

EWS に対して一般的で、この操作に固有のその他のエラー コードについては、「 ResponseCode」を参照してください。

関連項目