MGDC for SharePoint FAQ: What is the size of my sites?

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Community Hub.

1. Introduction


How much storage is being used by your SharePoint sites? Sounds like a simple question, but there are lots of details behind it. Do you mean the total size of the latest versions of the files, or do you include previous versions? Do you count the metadata size? How about deleted files in the recycle bin?


In this blog post, we’re going to dive into Storage Metrics for SharePoint (and OneDrive), using the SharePoint UX, the Admin Center, PowerShell, and the Microsoft Graph Data Connect for SharePoint. We’ll do this by creating a few different sites and watching how their storage sizes are reported in different tools.


Note: I touched on the multiple ways to look at Site information in a previous blog post. You might want to review it before moving forward here: Four Options for SharePoint Site Analytics.


2. Sizes to look for


There are different storage sizes reported for a SharePoint site, including:


  • Storage Used – Typically refers to all storage, including metadata, previous versions and the recycle bins. This is the number you see when using PowerShell cmdlets and the Admin Center reports, typically reported in megabytes.
  • Storage Metrics, Total Size – This number represents the total storage for a site, including metadata and previous versions, but does not include the recycle bins.
  • Storage Metrics, Metadata Size – This is the amount of storage used by the file metadata (information about the files, not the contents of the files). It’s typically negligible, unless you have a large number of small files.
  • Storage Metrics, Total File Stream Size – The size of the latest versions of files, also known as the “tip version” size.
  • Previous Versions Size – The size of the previous versions of the files. This can be a significant number if your files are constantly changing. You can calculate this by subtracting the metadata size and the total file stream size from the total size.
  • Recycle Bin Size – The size of deleted files in the recycle bins (SharePoint has two layers of recycle bin). This is included in the Storage Used but not in the Total Size.  You can calculate it as the Storage Used minus the Total Size.


Note: There is also a Storage Quota number, which represents the maximum storage allowed in the Site. The Administrator can adjust this. If Storage Used reaches Storage Quota, we say the site is “full”.


3. Places to look at


To get started, there are many ways to check the amount of storage being used by your SharePoint sites. For instance, you could use many different tools:


  • SharePoint client UX – This covers how you see storage while using SharePoint as a site user or a Site Collection administrator. If you know your way around the product and have the right permissions, you can see the latest version size (file stream size) and the previous version size.
  • PowerShell cmdlets – An administrator using this command-line tool can look at the Storage Used for each site, reported in megabytes (rounded).
  • SharePoint Admin Center reports – An administrator can also use the Usage reports in the Admin Center to see the total Storage Used overall and per site.
  • Microsoft Graph Data Connect – Using the MGDC, you can pull a complete list of all the SharePoint sites and OneDrives, including Storage Used, Total Size, Metadata Size and Total File Stream Size. You can use those to calculate the Previous Versions Size and the Recycle Bin Size.


4. Four test sites


To make things more concrete, I performed a simple experiment by creating 4 different sites, as follows:


  1. “Empty” Site. Created a site using a “Standard Team” SharePoint site template. This will work as a baseline, since it includes some basic lists and libraries.
  2. Site with Files. Created a site using the same template, then added 4 files with 10MB each which were never changed.
  3. Site with Deleted Files. Created a site using the same template, then added 4 files with 10MB each and deleted 1 of these 4 files.
  4. Site with Previous Versions. Created a site using the same template, then added 4 files with 10MB each and overwrote 1 of these 4 files.


These 4 sample test sites will give us some information about how the different sizes are reported with the different tools we mentioned.


5. Creating test sites


In case you want to run your own experiment, here is some detail on how to create the 4 sites proposed in your own environment. Creating the four sites is straightforward if your tenant has self-service site creation enabled. You go to the main page for SharePoint and use the option to “Create Site”.


Create SiteCreate Site



When creating the site, use a SharePoint Team site and the Standard Team template. Make sure to give each site a name that you can easily find later. In my case, I named them Storage Test followed by a number, like StorageTest1. You don’t need to add any members.

After the four empty sites are available, you will need to create 4 files with 10MB each.


The simplest way to do that is to open a cmd.exe command prompt with the “run as Administrator” option to run these commands:


cd %USERPROFILE%/Downloads fsutil file createNew test1.bin 10000000 fsutil file setValidData test1.bin 10000000


You can repeat those commands with different file names to create all 4 files. You get bonus points if you can code a loop in the old cmd.exe command prompt or do it in PowerShell.  


With the 4 files created in your Downloads folder, you can upload them as follows.

  • For site 1, no need to upload anything. This site will remain “empty”, just with what comes by default with the Standard Team template.
  • For site 2, just upload the 4 files to the existing “Documents” library.


Uploaded 4 itemsUploaded 4 items



  • For site 3, upload the 4 files, then delete one of them. This will be our “recycle bin” example.
  • For site 4, upload the 4 files, then reupload one of them. When prompted, confirm that you want to overwrite the file. This will be our “previous versions” example.


6. Check sizes in the SharePoint client UX


The simplest way to find about the sizes of the files is to use the SharePoint client and look at the “Document” library. The File Size column might be hidden by default, so you will need to add that column to your view by clicking on “Add column”, then “Show or hide columns”.


File Size ColumnFile Size Column



Note that the file sizes are converted to powers of 2 (1KB is 1024 bytes, 1MB is 1024KB), so 10 million bytes shows up as 9.54MB (10,000,000/1,024/1,024, rounded up to two decimals).

You can also use the option to view the version storage by clicking on the three dots (…) next to the file name you overwrote and choosing the option for “Version History”.


Version HistoryVersion History



You can also use the SharePoint UX to view items in the recycle bin. Users can only see the first level of the recycle bin. Administrators can see the second level of the recycle bin.


Recycle BinRecycle Bin



7. Check sizes with PowerShell cmdlets


Another way to look at the Storage for sites is using PowerShell. If you’re not familiar with how to query site SharePoint information using PowerShell, check section 2 of this blog post.


In our scenario, the Get-SPOSite cmdlet shows the following:


> Get-SPOSite | >> Where StorageUsageCurrent -gt 0 | >> Where Title -like "StorageTest*" | >> Select Title, Template, StorageUsageCurrent, StorageQuota | >> Sort StorageUsageCurrent -Descending Title Template StorageUsageCurrent StorageQuota ----- -------- ------------------- ------------ StorageTest4 GROUP#0 49 1048576 StorageTest3 GROUP#0 39 1048576 StorageTest2 GROUP#0 39 1048576 StorageTest1 GROUP#0 1 1048576


Note that the two storage-related properties are StorageUsageCurrent and StorageQuota. The first one is what we described earlier as Storage Used. Storage Quota also shows, with the site storage limit of 1 terabyte.


StorageUsageCurrent is shown here in megabytes, using base 2 and rounded up. Note that the “empty” site shows 1 megabyte usage because of what’s included in the template. Sites 2 and 3 show the same size, since they both have 4 files. The recycle bin is included, so the deleted file in Site 3 does count. Site 4 is larger because of the previous version for the overwritten file.


8. Check sizes in the Admin Center report


You can see a list of sites and sizes in the Admin Center report. Note that this report will take a few days to show the information, so if you go immediately to the report, you won’t find your newly created sites. After you wait patiently, you will see the files will show in the Admin Center reports.


Admin CenterAdmin Center




You will find one row for each site, with a column in the report for the Storage Used. Notice that it shows a slightly different rounding, but the numbers are close. The first “empty” site shows 1MB, second and third show 40MB and the fourth site with the extra version shows 49MB.


Note that the number of files shows 2 for the first site and 6 for the other 3, which is 2 more than we expected. It turns out that the template brings in some default files, like the icon for the team site. The files also use a little bit of storage, which explains why the “empty” site is not completely empty.


9. Check sizes with the Microsoft Graph Data Connect


Finally, you can check sizes using the MGDC. This option brings lots of details for each site, including several the different storage sizes we discussed earlier. You need to wait 48 hours before the data will be available on the MGDC SharePoint datasets.


If you’re not familiar with how to grab a detailed dataset for your SharePoint sites using the MGDC, read this blog post for a detailed step-by-step. Here is an excerpt from the JSON results from the MGDC dataset for SharePoint Sites for site 4:


"Url": "",
"RootWeb": {
    "Id": "e9f81c10-bb5a-4a43-ace8-4034b909e0f8",
    "Title": "StorageTest4",
    "WebTemplate": "GROUP",
    "WebTemplateId": 64,
    "LastItemModifiedDate": "2023-07-29T20:20:00.000Z"
"WebCount": 1,
"StorageQuota": 1099511627776,
"StorageUsed": 51535126,
"StorageMetrics": {
    "MetadataSize": 73579,
    "TotalFileCount": 6,
    "TotalFileStreamSize": 40016480,
    "TotalSize": 51492522


You can see that the StorageUsage data matches what we’ve seen before, but it shows the number in bytes (not in megabytes). Many storage-related numbers are present inside the “Storage Metrics” structure and the two missing ones can be estimated using simple formulas:


  • Previous Versions = Total Size – Metadata Size – Total File Stream Size
  • Recycle Bin Size = Storage Used – Total Size


Here is a summary of the storage-related metrics for the 4 sites we’re tracking:


Site Storage
File Stream

No files
1,532,377 71,664 16,467 1,489,773 1,401,642 42,604
4 files

41,534,483 73,161 40,016,467 41,491,879 1,402,251 42,604
4 files
1 deleted

41,535,644 72,828 30,016,476 31,490,627 1,401,323 10,045,017
4 files
1 overwritten
51,535,126 73,579 40,016,480 51,492,522 11,402,463 42,604


As you can see, the bulk of the storage is related to the 4 large files uploaded, including the deleted file in the recycle bin and the previous version. Calculations for both the recycle bin and previous versions show a small amount of storage even when the site is “empty”, but growth is consistent as we add files. The metadata size changes only a few hundred bytes with each additional file in our case (metadata such as the file name can vary in size).


10. Conclusion


I hope this post helped you understand the many different metrics for storage size available for each SharePoint site (or OneDrive). We were able to observe some of the details here by creating a few tightly controlled test sites, making sure these sites stayed unchanged as the data was processed by the Admin Center and the Microsoft Graph Data Connect for SharePoint. In the real world, sites are constantly changing and it’s a lot more difficult to pinpoint the specific impact of metadata, versions and deleted files.


I recommend using the more detailed data in Microsoft Graph Data Connect for SharePoint to run detailed analysis of your SharePoint and OneDrive storage metrics. For more information, refer to the overview post at

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.