Powershell vs. API for SPOSites

Steel Contributor

i have two general questions in regards to SPOSites and Usage

 

1)  API SPI Site Usage- why only Teams and Group Sites ?

What is the reason why the new SharePoint Site Usage Report includes only Group and Teamsites ?

https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/reportroot_sharepointsiteusa...

 

I would have expected that one would see ALL SPO Sites in that Usage Report.

 

2) Output differs between Powershell and API

If i trigger Get-SPOSite via Powershell then sometimes i don't see all the Teamsites. If i pull the list via API then i see them.

So the question is, which Source is more reliable ? i would love to use the API but because of topic 1 i need to rely also on Powershell in order to pull all Sites.

Or are there OTHER ways where i can pull all SPO Sites via API ?

 

suggestions are welcome :)

 

 

 

 

6 Replies

Ey @Stefan Fried :

For 1), adding @Anne Michels

For 2), Get-SPOSite has been always work for me...I don't recall to see the problem you are describing

Hi Stefan,

We plan to enhance this definition in the future with additional user activity information (page views: number of times a user has visited a page and number of pages a user has visited) and to capture activity from all site types (in addition to groups and team sites).

Thanks,

Anne

thanks for this information,anne

 

@Juan Carlos González Martínthanks for your feedback too.

 

My pleasure Stefan!

i would like to ask you about the timeline when these additional APIs will become available.

Is Microsoft targeting this for Q3 or Q4 this year (or even later?)

 

thank you anne

Hi Stefan,

we're targeting to update the reports in the next quarter and will share more information on the Office Blog once available.

Thanks,

Anne