Wajid Anwar
Wajid Anwar

Reputation: 1

getActivitiesByInterval to get Sharepoint usage

I am using below api endpoint for Sharepoint online analytics (site usage):

https://graph.microsoft.com/v1.0/sites/{siteId}/getActivitiesByInterval(startDateTime='2024-05-15',endDateTime='2024-05-19',interval='day')

I am getting data broken down by each day between the date range provided like below:

{ "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.itemActivityStat", "aggregationInterval": "None", "startDateTime": "2024-05-15T00:00:00Z", "endDateTime": "2024-05-21T00:00:00Z", "isTrending": true, "access": { "actionCount": 2463, "actorCount": 850, "timeSpentInSeconds": 0 }, "incompleteData": { "wasThrottled": false, "resultsPending": false, "notSupported": false } }

actionCount and actorCount are accurate but not sure why timeInSeconds is always showing 0 for each of the day. Any ideas?

I have tried different date ranges and sites but similar result for all.

Upvotes: 0

Views: 87

Answers (1)

Xyza_MSFT
Xyza_MSFT

Reputation: 409

The lack of hourly granularity is a by-design limitation of the Graph API.

While you can get daily summaries, more granular time intervals (such as hourly breakdowns) are not available directly through the API.

Upvotes: 0

Related Questions