4.3 Getting Searchable Mailboxes

This example of the GetSearchableMailboxes operation, as defined in section 3.1.4.3, shows a request from the client to get searchable mailboxes.

 <?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:GetSearchableMailboxes>
       <m:SearchFilter>lolgroup</m:SearchFilter>
       <m:ExpandGroupMembership>true</m:ExpandGroupMembership>
     </m:GetSearchableMailboxes>
   </soap:Body>
 </soap:Envelope>

This server sends the following successful response for an unexpanded distribution 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="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">
     <GetSearchableMailboxesResponse ResponseClass="Success" 
           xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
       <ResponseCode>NoError</ResponseCode>
       <SearchableMailboxes>
         <SearchableMailbox xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
           <Guid>33a408fe-1574-4e3b-99f5-6e1e001f3035</Guid>
           <PrimarySmtpAddress>LOLgroup@exhb-93591dom.extest.microsoft.com</PrimarySmtpAddress>
           <IsExternalMailbox>false</IsExternalMailbox>
           <ExternalEmailAddress/>
           <DisplayName>LOLgroup</DisplayName>
           <IsMembershipGroup>true</IsMembershipGroup>
           <ReferenceId>/o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=85793b958a0b4295b13b8f02b81bf9cc-LOLgroup</ReferenceId>
         </SearchableMailbox>
       </SearchableMailboxes>
     </GetSearchableMailboxesResponse>
   </s:Body>
 </s:Envelope>

The server sends the following response for an expanded distribution 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="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">
     <GetSearchableMailboxesResponse ResponseClass="Success" 
              xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
       <ResponseCode>NoError</ResponseCode> 
       <SearchableMailboxes>
         <SearchableMailbox 
              xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
           <Guid>e5d42cdf-a027-4ec6-986b-6fa0ecadb9f5</Guid>
           <PrimarySmtpAddress>JSmith@exhb-
                93591dom.extest.microsoft.com</PrimarySmtpAddress>
           <IsExternalMailbox>false</IsExternalMailbox>
           <ExternalEmailAddress/>
           <DisplayName>Julia Smith</DisplayName>
           <IsMembershipGroup>false</IsMembershipGroup>
           <ReferenceId>/o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=0a4fc86f888246159405d60956dd02d7-Julia</ReferenceId>
         </SearchableMailbox>
         <SearchableMailbox xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
           <Guid>45d0fffb-5013-459a-a34c-52453b30e9ca</Guid>
           <PrimarySmtpAddress>LMoore@exhb-93591dom.extest.microsoft.com</PrimarySmtpAddress>
           <IsExternalMailbox>false</IsExternalMailbox>
           <ExternalEmailAddress/>
           <DisplayName>Laura Moore</DisplayName>
           <IsMembershipGroup>false</IsMembershipGroup>
           <ReferenceId>/o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=2910d8f8222f4374bbf9338d8f9d714b-Laura</ReferenceId>
         </SearchableMailbox>
         <SearchableMailbox xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
           <Guid>3c620d04-8b33-435e-95be-5b9351599576</Guid>
           <PrimarySmtpAddress>SBrown@exhb-93591dom.extest.microsoft.com</PrimarySmtpAddress>
           <IsExternalMailbox>false</IsExternalMailbox>
           <ExternalEmailAddress/>
           <DisplayName>Steven Brown</DisplayName>
           <IsMembershipGroup>false</IsMembershipGroup>
           <ReferenceId>/o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=35181a742f0e47e392c8201a60d13ecf-Steve</ReferenceId>
         </SearchableMailbox>
       </SearchableMailboxes>
     </GetSearchableMailboxesResponse>
   </s:Body>
 </s:Envelope> -->