Hi @Tilo ,
If interested, you can use Microsoft Graph PowerShell SDK to work with graph.
Get started with the Microsoft Graph PowerShell SDK
Once you installed the Graph SDK module. Run the following commands to connect the Graph with required permissions.
#Connect Microsoft Graph
$RequiredScopes = @("Reports.Read.All")
Connect-MgGraph -Scopes $RequiredScopes
Use the following command to get SharePoint site usage details.
Invoke-MgGraphRequest -Uri "https://graph.microsoft.com/v1.0/reports/getSharePointSiteUsageDetail(period='D180')" -OutputFilePath "C:\Temp\Report.csv"
As @Michael mentioned, refer the following documentation to get the desired graph end-point and use it in the above command.
- SharePoint activity reports: https://learn.microsoft.com/en-us/graph/api/resources/sharepoint-activity-reports
- SharePoint site usage reports: https://learn.microsoft.com/en-us/graph/api/resources/sharepoint-site-usage-reports
@Sunny Rastogi did you figure out an easy way?