I'm trying to fetch all subsites (just those at the root level, not sub-subsites, etc.). But, I suspect due to volume (4,000+ subsites), the following times out.
clientContext.Load( clientContext.Web.Webs, w => w.Include(s => s.Url), w => w.Include(s => s.RoleAssignments)); await clientContext.ExecuteQueryAsync();
I've tried increasing the timeout by setting
clientContext.RequestTimeout = 600000;, but then instead of timing out, the query eventually results in error:
The remote server returned an error: (503) Server Unavailable.
Is there some way I can paginate the results, or another way I can fetch a list of subsites that won't result in a timeout?