The examples below require a Powershell module available here on Technet Gallery.

As discussed in Get any SharePoint Online object with Powershell, REST API endpoints allow us to interact with sites remotely. The examples below use these possibilities and together with a single cmdlet from a Powershell module pull useful data, troubleshoot your tenant and create reports in a way that is not possible with SharePoint Online Management Shell.


Get properties of the site collection

Get-SPOObject -Username -password $pass -Url '' -Object "site"


Get subsites of a site

Get-SPOObject -Username -password $pass -Url '' -Object "web/webs"
Get-SPOObject -Username -password $pass -Url '' -Object "web/webs" | select url, webtemplate, created

Get groups user belongs to from entire site collection

Get-SPOObject -Username -password $pass -Url '' -Object "web/siteusers/getbyid(11)/groups"


See Also