Office 365 Reporting Web Service Returning Incorrect Data
The issue mentioned below has now been resolved by Microsoft. Cogmotive logged a support ticket to Office 365 and the Microsoft support team acknowledged that the issue existed and resolved it in a timely manner.
Microsoft have made available an Office 365 Reporting Web Service that allows customers generate their own usage reports.
The web service allows access to multiple sets of reporting data which can be extracted in either ATOM or JSON format. Most of these web data sets also have a corresponding PowerShell cmdlet which, according to Microsoft, returns the same data from the same location.
The spreadsheet and the admin portal both call the Reporting web service, which in turns calls the Windows PowerShell cmdlets. You can also call those cmdlets directly. The Windows PowerShell cmdlets are the only things that access the datamart directly, which ensures that every different type of access method has the same data.
We have come across one instance using the MailTraffic report where this is simply not true.
Using a test PowerShell script that we created we can compare the data that is returned from the Office 365 Reporting Web Service and the corresponding Office 365 PowerShell cmdlet.
You can see the results in the table below.
|Date||Inbound Mail (Web Service)||Inbound Mail (PowerShell)||Outbound Mail (Web Service)||Outbound Mail (PowerShell)|
You can clearly see that not only does the Web Service return much less data, it also seems to truncate the results in the first available date.
In some cases we were able to return many months of data from the PowerShell cmdlet whilst the Web Service only returned 14 days.
Don’t trust everything you read in Microsoft TechNet and be careful when relying on the Office 365 Reporting Web Service for accurate reporting.