Jan 03 2017 02:37 AM
Jan 03 2017 02:37 AM
We've been using a scheduled job to get some statistics out of our SPO sites for over a year and one thing we've been using is the Tenant.GetSiteProperties(https://msdn.microsoft.com/en-us/library/microsoft.online.sharepoint.tenantadministration.tenant.get...) to return data about the sites. From this method we've saved data from the property StorageUsage on SiteProperties class (https://msdn.microsoft.com/en-us/library/microsoft.online.sharepoint.tenantadministration.siteproper...). But starting in December it seems like this property is returning 0 for every object. Anyone else experienced this?
Jan 03 2017 12:50 PM
we have the same issue, is there a new way to get this information?
Jan 03 2017 10:58 PM
We've changed to use the Site.Usage property instead(UsageInfo includes a Storage property), but that forces us to do one additional CSOM call for each site.
Jan 04 2017 04:12 AM
Jan 04 2017 04:12 AMSolution
I ran into the same problem a few weeks ago, for another properpty - web count. (Here's the post on this site about it)
Jan 12 2017 05:54 AM
I was having the same problem and just figured out that by using tenant.GetSitePropertiesFromSharePoint, I can get the Storage Usage. However, I don't see the WebCount property being filled up, but I didn't paid much attention to it since I was trying to get the Usage.
Feb 12 2018 02:48 AM
It is very strange behavior that StorageUsed is suddenly 0 for Tenant.GetSiteProperties() but it is available for Tenant.GetSitePropertiesFromSharePoint(). On MSDN there is no clear distiction beween the 2 methods. And it is also not very clear based on the naming of the functions. Strange that things change but there is hardly any documentation to be found. It is all trial and error at the moment.
Feb 19 2018 07:45 AM
So, now I modified my scripts to use the new GetSitePropertiesFromSharePoint() method. And....it seems like a very poorly implemented method. It times out 9 out of 10 attempts made to fetch site properties. And when it does, the collection is almost 1500 site collections (GetSiteProperties does/did around 300 if I'm not mistaken). Why have an implementation to try and fetch 1500 records and timeout most of the time? Anyone have any better luck with GetSitePropertiesFromSharePoint().
Note: Noticed that PNP libraries have been updated to use GetSitePropertiesFromSharePoint() with pull reuqests stating the GetSitePropertiies() will be deprecated.