SOLVED

Microsoft 365 usage data from Graph API broken?

%3CLINGO-SUB%20id%3D%22lingo-sub-2713999%22%20slang%3D%22en-US%22%3EMicrosoft%20365%20usage%20data%20from%20Graph%20API%20broken%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2713999%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Everyone%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20been%20using%20data%20from%20the%20Graph%20API%20for%20Mailbox%20and%20OneDrive%20usage%20statistics%20for%20a%20while%2C%20but%20for%20the%20last%20few%20days%20it%20seems%20that%20it%20broken.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20I%20run%20the%20following%20in%20the%20Graph%20Explorer%2C%20it%20just%20fails%20with%20no%20response%2C%20not%20even%20valid%20headers%20are%20returned.%20(documented%20here%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Freportroot-getmailboxusagedetail%3Fview%3Dgraph-rest-1.0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Freportroot-getmailboxusagedetail%3Fview%3Dgraph-rest-1.0)%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGET%20%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Freports%2FgetMailboxUsageDetail(period%3D'D7')%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Freports%2FgetMailboxUsageDetail(period%3D'D7')%26nbsp%3B%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnyone%20else%20having%20this%20issue%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2713999%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2715800%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20365%20usage%20data%20from%20Graph%20API%20broken%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2715800%22%20slang%3D%22en-US%22%3EGraph%20explorer%20doesn't%20render%20CSV%20files%2C%20which%20is%20the%20default%20response%20you%20will%20receive%20from%20calling%20the%20above.%20Use%20Postman%20or%20any%20other%20tool%2C%20or%20just%20request%20the%20JSON%20instead%20%3CBR%20%2F%3E%3CBR%20%2F%3EFor%20example%3A%3CBR%20%2F%3EGET%20%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2Freports%2FgetEmailAppUsageUserDetail(period%3D'D7')%3F%24format%3Dapplication%2Fjson%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fbeta%2Freports%2FgetEmailAppUsageUserDetail(period%3D'D7')%3F%24format%3Dapplication%2Fjson%3C%2FA%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2726295%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20365%20usage%20data%20from%20Graph%20API%20broken%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2726295%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETurns%20out%20the%20CSV%20data%20is%20being%20returned%2C%20but%20is%20in%20the%20wrong%20format.%20The%20UPN%20and%20Display%20Names%20are%20showing%20as%20some%20sort%20of%20GUID%20or%20ID%2C%20instead%20of%20actually%20showing%20the%20correct%20data.%20This%20is%20why%20my%20integration%20broke.%20Anyone%20seen%20this%20or%20know%20why%20its%20happening%3F%20Pic%20attached.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi Everyone,

 

I've been using data from the Graph API for Mailbox and OneDrive usage statistics for a while, but for the last few days it seems that it broken.

 

If I run the following in the Graph Explorer, it just fails with no response, not even valid headers are returned. (documented here: https://docs.microsoft.com/en-us/graph/api/reportroot-getmailboxusagedetail?view=graph-rest-1.0)

 

GET https://graph.microsoft.com/v1.0/reports/getMailboxUsageDetail(period='D7') 

 

Anyone else having this issue?

4 Replies
Graph explorer doesn't render CSV files, which is the default response you will receive from calling the above. Use Postman or any other tool, or just request the JSON instead

For example:
GET https://graph.microsoft.com/beta/reports/getEmailAppUsageUserDetail(period='D7')?$format=application...

Thanks @Vasil Michev 

 

Turns out the CSV data is being returned, but is in the wrong format. The UPN and Display Names are showing as some sort of GUID or ID, instead of actually showing the correct data. This is why my integration broke. Anyone seen this or know why its happening? Pic attached.

 

 

best response confirmed by Hugh_Burns (New Contributor)