Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

About: Exchange Reporting Services

Below is information on accessing the c. Note that you will need to do a GET and a property formatted URL with an admin account which can pull the reports. If there are issues you can check the Report by running it in ECP and also by pulling the report with Excel. Be sure to read the documentation on the options for the report parameters. Code wise your code will need to handle reading the data in a chunked format. To get back an XML response use "format=Atom" at the end and for a Json response use "format=Json". Basic authentication can be used against Exchange Online for these reports. If you have any issues with the API you should test to see if the issue reproduces from 365 to see if the issue reproduces – if it reproduces then the issue is no with your code. You can do a test run of these reports also by using the EWS POST window in EWSEditor, setting the Verb to GET, using Basic Authentication and setting the URL to what is needed to pull the report – examples are below. Please note that I've included most of the information in this blog post in a sample in EWSEditor's EWS POST window under the name "Office365ReportingServices.xml".

Exchange reports:

Office 365 Reporting Web service

Exchange reports available in Office 365 Reporting web service

Office 365 Admin portal

Office 365 Reporting web service and Windows PowerShell cmdlets

Example report URLs:

List reports - see the possible reports to run

General weekly report:

A daily report for 15 days:$select=Date,ActiveUsers &$filter=Date%20ge%20datetime'2017-01-01T00:00:00'%20and%20Date%20le%20datetime'2017-01-15T00:00:00'&$orderby=Date%20desc&$format=Atom

A daily report for 2 weeks:$select=Date,ActiveUsers &$filter=Date%20ge%20datetime'2017-01-01T00:00:00'%20and%20Date%20le%20datetime'2017-01-14T00:00:00'&$orderby=Date%20desc&$format=Atom

Monthly activity:

Mailbox usage:

Mailbox daily activity report – top 20:$select=Date,TotalNumberOfActiveMailboxes&$top=20&$orderby=Date%20desc&$format=Atom

Connections by client type:

Daily connection report$select=Date,ClientType,Count,Date,UserName,WindowsLiveID&$format=Atom

Daily connection report during a time range:$select=ClientType,Date,Count,UserName,WindowsLiveID&$filter=Date%20ge%20datetime'2017-01-01T00:00:00'%20and%20Date%20le%20datetime'2017-01-14T00:00:00'&$orderby=ClientType,Date&$format=Atom

Daily connection report for a specific mailbox during a time range:$select=ClientType,Date,Count,UserName,WindowsLiveID&$filter=Date%20ge%20datetime'2017-01-01T00:00:00'%20and%20Date%20le%20datetime'2017-01-14T00:00:00'%20and%20WindowsLiveID %20eq%20'[email protected]'&$orderby=ClientType,Date&$format=Atom

Below is a partial sample for pulling a report with a GET. Note that the code for pulling the reports needs to handle a chunked response. For a full sample look at the HttpHelper.cs file in EwsEditor's code.

if (sVerb == "GET")


byte[] bData = new byte[1028];

string sData = string.Empty;

StringBuilder sbFullData = new StringBuilder();

oHttpWebResponse = (HttpWebResponse)oHttpWebRequest.GetResponse();

Stream oStream = oHttpWebResponse.GetResponseStream();

int bytesRead = 0;


//while ((bytesRead = await result.Result.ReadAsync(data, 0, data.Length)) > 0)

while ((bytesRead = oStream.Read(bData, 0, bData.Length)) > 0)


sData = System.Text.Encoding.UTF8.GetString(bData, 0, bytesRead);




sResult = sbFullData.ToString();


Share the post

About: Exchange Reporting Services


Subscribe to Msdn Blogs | Get The Latest Information, Insights, Announcements, And News From Microsoft Experts And Developers In The Msdn Blogs.

Get updates delivered right to your inbox!

Thank you for your subscription