0

Pretty new to powershell and API so wanted to ask about the following. I have been trying to get some site usage details by calling this MS Graph API "https://graph.microsoft.com/v1.0/reports/getSharePointSiteUsageDetail(period='D30')"

By calling it will give me the usage data for the last 30 days.

What i wanted to know is that will it be possible to select a custom report period. Lets say the last 30 days before the 10th of April 2023. So the usage data from 10 of March till 10 of April.

Anything i should try, advice?

Thanks

Tried "https://graph.microsoft.com/v1.0/reports/getSharePointSiteUsageDetail(period='D30',startDate='2023-03-11',endDate='2023-04-10')" but not possible.

Pret19
  • 1
  • 1
  • Check the doc: https://learn.microsoft.com/en-us/graph/api/reportroot-getsharepointsiteusagedetail?view=graph-rest-1.0 You can specify only the period or a specific day, not both. – user2250152 Apr 18 '23 at 06:02

1 Answers1

0

As @user2250152 said, you can specify only the period or a specific day, not both.

https://graph.microsoft.com/v1.0/reports/getSharePointSiteUsageDetail(period='D30')

Or

https://graph.microsoft.com/v1.0/reports/getSharePointSiteUsageDetail(startDate='2023-03-11',endDate='2023-04-10')
Carl Zhao
  • 8,543
  • 2
  • 11
  • 19