Navigation Menu

Monday, 22 February 2016

Get all sites and subsites in SharePoint Online using C#

We can easily get the list of all sites and sub sites of all site collections from a Office 365 tenant using SharePoint's client object model (CSOM) in C#. In this article, I am going to write C# code sample to retrieve all sites and sub sites in a SharePoint tenant and get all subsites for the given site url.