web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Pulling report for Sto...
Power Automate
Unanswered

Pulling report for Storage Metrics on a SPO site

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I have an individual in my organization needing a report every month of where their site collection's storage is at. If possible, I'd like to set this up in Power Automate but I am not well versed in the nitty-gritty side of flow building to be able to come up with the solution myself.

 

Would anyone be able to show me a flow that would pull the storage metrics number and then send that in an email every month? It doesn't need to be in-depth or broken down to where all the data is going, I would literally just need the number of GBs currently being used at the time of each report. Something like:

 

Site Collection Storage Report: 10 out of 25 GB used

 

Thanks all!

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,181 Most Valuable Professional on at
    Re: Pulling report for Storage Metrics on a SPO site

    Hi @Becca_Hayes,

     

    In that case you can use the getSharePointSiteUsageDetail of the Graph API.

    https://learn.microsoft.com/en-us/graph/api/reportroot-getsharepointsiteusagedetail?view=graph-rest-1.0

     

    That method can output a csv with those details.

     

    Below is an example

     

    1. Add a recurrence action, in this case once a month

     

    2. Use for example a HTTP action
    This does require setting up an Azure AD app with the proper permissions, in this case Reports.Read.All

     

    Use the URI

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

     

    3. Add another HTTP action. Make sure it only run on the has failed event (via the Configure run after setting of the action). This is because the first HTTP will respond with a Redirect error with the download location of the csv 

     

    Use the expression below to use that download location

    actions('HTTP')['outputs']['headers']['Location']

     

    4. Use the content of that CSV to create a file in for example SharePoint, via the Create File action. The Body is used for the file content and I used the below for the unique file name

    StorageDetails_@{utcNow('yyyyMM')}.csv

     

    getstoragedetails_sposites.png

  • Becca_Hayes Profile Picture
    on at
    Re: Pulling report for Storage Metrics on a SPO site

    Hello,

     

    Thank you for such a detailed response. However, I am unable to use the HTTP request you have shown as I do not have the proper licensing for it within my organization and it's not as simple as just asking for the licensing, unfortunately.

     

    Is there an alternative way of doing this, or would this be the only/best option?

     

    Thank you for your time.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard