Use the QueryConsumersByOrganization procedure of the Exchange Resource Manager namespace to return all consumers of a particular owning organization and the resources available to them.
This procedure expects to be called with impersonate="1". The procedure impersonates the caller.
<request>
<procedure>
<execute namespace="Exchange Resource Manager" procedure="QueryConsumersByOrganization">
<executeData>
<organization>LDAP://ou=ExchOrg1,dc=contoso,dc=com</organization>
</executeData>
<after source="executeData" destination="data"/>
</execute>
</procedure>
</request>
The following input is valid for this request:
In the <organization> element, enter the Lightweight Directory Access Protocol (LDAP) path of the organization to be queried. Alternatively, in the <GUID> element, enter the globally unique identifier (GUID) of the organization to be queried.
<organization>LDAP://LDAP path of the owning organization</organization>
or
<GUID>{globally unique identifier}</GUID>
This request returns a list of all the mailboxes and public stores used by the organization, including the total storage available for each.
<response>
<data>
<organization>LDAP://ou=Hosting,dc=contoso01,dc=com</organization>
<mailboxes>
<mailbox>
<GUID>{2485e2f2-3bae-4562-be7b-a3952228e697}</GUID>
<path>LDAP://CN=HA,OU=Hosting,DC=contoso01,DC=com</path>
<kilobytes>100</kilobytes>
</mailbox>
</mailboxes>
<publicFolders></publicFolders>
</data>
</response>
Important