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 : 2c5fzYYpkI8lq2xGjhvusb
Power Automate - Building Flows
Unanswered

SharePoint site storage report

Like (0) ShareShare
ReportReport
Posted on 2 Jul 2021 08:22:49 by 315

Is there any way to generate a report in Power automate which gets the SharePoint site storage used ?

  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on 05 Jul 2021 at 10:56:28
    Re: SharePoint site storage report

    @Prathameshpatka  you can do following:

     

    1. Add Send an HTTP request to SharePoint, in site address provide your SharePoint admin center site url, it will be in format: https://tenant-admin.sharepoint.com/ and configure the action as shown below 

    annajhaveri_0-1625480916521.png

    Provide URI as follows, this can get max 5000 sites from your tenant

    _api/Web/Lists/GetbyTitle('DO_NOT_DELETE_SPLIST_TENANTADMIN_ALL_SITES_AGGREGATED_SITECOLLECTIONS')/Items?$select=Title,SiteId,SiteUrl&$filter=TemplateId ne 21&$top=5000

     

    2. Then add parse json action, provide Body parameter from send http request action dynamic content, and generate from sample using below json

    {
     "type": "object",
     "properties": {
     "d": {
     "type": "object",
     "properties": {
     "results": {
     "type": "array",
     "items": {
     "type": "object",
     "properties": {
     "__metadata": {
     "type": "object",
     "properties": {
     "id": {
     "type": "string"
     },
     "uri": {
     "type": "string"
     },
     "etag": {
     "type": "string"
     },
     "type": {
     "type": "string"
     }
     }
     },
     "Title": {
     "type": "string"
     },
     "SiteId": {
     "type": "string"
     },
     "SiteUrl": {
     "type": "string"
     }
     },
     "required": [
     "__metadata",
     "Title",
     "SiteId",
     "SiteUrl"
     ]
     }
     },
     "__next": {
     "type": "string"
     }
     }
     }
     }
    }

     

    3. Again add send http request to SharePoint action,  in site address parameter, select custom value from dropdown, which will open dynamic content, select the Site URL from dynamic content (this will automatically add apply to each action) and provide the Uri: _api/site/usage

     

    annajhaveri_1-1625482331860.png

     

    Then using output of site usage http action, you can create json array from this data and create HTML report

     

     

  • Prathameshpatka Profile Picture
    315 on 05 Jul 2021 at 07:45:21
    Re: SharePoint site storage report

    @annajhaveri 

     

    I am looking to retrieve the site storage report of all the sites within a tenant

  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on 05 Jul 2021 at 06:54:50
    Re: SharePoint site storage report

    @Prathameshpatka  do you want to get site usage of one site collection or multiple site collections?

     

    You can use REST API in Send HTTP Request to SharePoint action to get the usage:

    annajhaveri_0-1625468079258.png

     

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete