What are the exact start/end timeframes for the graph API "30 days" reports?

ShaSap 0 Reputation points
2024-10-17T16:42:52.0333333+00:00

We routinely pull several aggregate (the 30 days and daily) usage metrics from the graph API (e.g., Microsoft Teams user activity, OneDrive activity, SharePoint activity, etc), but I would like understand exactly what time frame (i.e., down to the second) "30 days" includes. Here is a detailed scenario:

Let's say our job kicks off at 9:00 a.m. UTC on 10/1/2024 and we are pulling a 30 day usage report. Does that report account for activity from essentially 9/1/2024 09:00:00 UTC - 10/1/2024 09:00:00 UTC (aka, 30 rolling days from the exact second), or 9/1/2024 00:00:00 UTC - 9/30/2024 23:59:59 UTC (aka, most recent full 30 calendar days)?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,226 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Vasil Michev 107.3K Reputation points MVP
    2024-10-18T07:05:53.8+00:00

    No. Reports are generated with few days delay (at best). You can check the reportRefreshDate property within the output to get an idea as to what date the data is current for, as well as the reportDate property for individual datapoints.


  2. Yakun Huang-MSFT 6,340 Reputation points Microsoft Vendor
    2024-10-18T07:37:23.51+00:00

    Hello ShaSap,

    Thank you for reaching out to Microsoft Support!

    Extract 30 days as the first 30 days from your current time, if your current time is October 1, then the first 30 days is September 1 - October 1 30 days, according to the document, the date format is YYYY-MM-DD, the time is accurate to days, not accurate to seconds, and when just tested, the endpoint's current range is 28 days.

    User's image

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.


  3. ShaSap 0 Reputation points
    2024-10-30T15:08:28.3333333+00:00

    Was able to reach out to MS support and basically it's 30 calendar days (in UTC timezone) from the report's refresh date. Here is their exact verbiage:

    "The timeframe used when generating a report for the last 30 days in the M365 Admin Center is the most recent 30 calendar days with data available. This means that if you run a 30-day report on 01 Nov at 14:15:00 UTC and the report’s refresh date is 29 Oct, it will only include activity from 30 Sep 00:00:00 UTC to 29 Oct 23:59:59 UTC12."

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.