1

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

https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-csom/mt779503(v%3Doffice.15)

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.

https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-csom/dn159183%28v%3doffice.15%29

Hope someone can help me here

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

https://briantjackett.com/2017/08/23/sharepoint-csom-to-traverse-all-sites-in-sharepoint-online/

Ravi Khambhati
  • 1,043
  • 22
  • 42

1 Answers1

0

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
Zdeněk Vinduška
  • 2,889
  • 2
  • 12
  • 24
  • 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 08 '19 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 08 '19 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 08 '19 at 22:14