Retrieve All Mailboxes

 

Applies To: Windows Server 2012 Essentials

Retrieves all mailboxes.

URI Template

POST services/builtin/MailboxManagement.svc/mailboxes

Sample Request

POST https://www.contoso.com/services/builtin/MailboxManagement.svc/mailboxes HTTP/1.1  
Content-Type: application/xml  
Accept: application/xml  
Cookie: ASP.NET_SessionId=********************  
Canary: *********************  
Host: domainname  
Content-Length: 0  

Sample Response

On-Premises Exchange Server

HTTP/1.1 200 OK  
<ArrayOfMailbox  
    xmlns="http://contracts.microsoft.com/WindowsServerEssentials/2011/09/WebApi"  
    xmlns:i="http://www.w3.org/2001/XMLSchema-instance">  
  <Mailbox i:type="ExchangeServerMailbox">  
    <Email>AuroraUser@contoso.com</Email>  
    <UserName></UserName>  
    <Quota>0</Quota>  
    <QuotaEnforced>false</QuotaEnforced>  
  </Mailbox>  
  <Mailbox i:type="ExchangeServerMailbox">  
    <Email>test123@contoso.com</Email>  
    <UserName>test123</UserName>  
    <Quota>2</Quota>  
    <QuotaEnforced>true</QuotaEnforced>  
  </Mailbox>  
</ArrayOfMailbox>  

Microsoft Office 365

HTTP/1.1 200 OK  
<ArrayOfMailbox  
    xmlns="http://contracts.microsoft.com/WindowsServerEssentials/2011/09/WebApi"  
    xmlns:i="http://www.w3.org/2001/XMLSchema-instance">  
  <Mailbox i:type="Office365Mailbox">  
    <Email>AuroraStdUser@tt2000.onmicrosoft.com</Email>  
    <UserName i:nil="true"/>  
    <Activated>true</Activated>  
  </Mailbox>  
  <Mailbox i:type="Office365Mailbox">  
    <Email>AuroraUser@tt2000.onmicrosoft.com</Email>  
    <UserName i:nil="true"/>  
    <Activated>true</Activated>  
  </Mailbox>  
</ArrayOfMailbox>  

Error Codes

Error Code Error Message
400 One or more parameters are not valid.
500 An internal server error occurred.

See Also

Web Service Methods