I can find a number of articles on how to get all sites in SharePoint online and everyone referring to the below method


One of the answers I am looking for is how many maximum number of sites will it return?

My gut feeling says it will not return all and there has to be a specific number.

When I looked at properties of "SPOSitePropertiesEnumerable" object I can see "NextStartIndex" which clearly for next number of sites.


Hope someone can help me here

Edit(2/9) Based on below blog post it should only return 200 sites



There are lots of possibilities how get all SPO sites:

  • in PowerShell with SPO cmds: Get-SPOSite -Limit All documentation here, now listing Groups and Teams sites too. Great article is written here.
  • with PNP Get-PnPTenantSite after Connect-PnPOnline -Url https://company-admin.sharepoint.com
  • Thanks for the response but this is not what I am looking for. I am looking for an answer on how many maximum number items will "GetSitePropertiesFromSharePoint" api return. – Ravi Khambhati Feb 8 at 16:43
  • Ah ok, so you can try it and you will see? I havent find any documentation for it. – Zdeněk Vinduška Feb 8 at 20:29
  • Not sure how many sites should I create one of the blog posts says it's going to return max 200 but not sure so looking for some concrete answers. Preferably from Microsoft site. – Ravi Khambhati Feb 8 at 22:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.