Export Site Collection usage Report On Schedule

Copper Contributor

is it possible to export the SharePoint usage report on schedule? 

What we would like to do is to have the usage of a SharePoint site collection beyond the 90 days mark offered by Microsoft (be able to get all the historic usage report) 
this means that we would need to run the 90 days usage report at least  4 times through the year and have it stored somewhere on a SharePoint library 

is this possible ?  

The purpose is to create a report on Power BI that will show the historic usage of the site. 

Thank you

3 Replies
The report is available via the Graph API (https://docs.microsoft.com/en-us/graph/api/reportroot-getsharepointsiteusagedetail?view=graph-rest-1...), so just plug that into your favorite automation tool. PowerShell scheduled task, Flow, runbooks... all will work fine.

@MikePalomares If you are comfortable using PowerShell, check out this PnP sample that gets site usage report and exports it to csv. You need to update the script to just get data for a particular site collection. If this works out, you can schedule this to run monthly to get your data for report. Get Site Usage Reports And Export It To CSV | PnP Samples 

@Vasil Michev 
I see this will extract all sites usages in the tenant, is there a way to do it for an specific site collection ?