Web.EnsureFolderPathImplementation throws "The attempted operation is prohibited because it exceeds the list view threshold."
nils-a opened this issue · comments
Resolve-PnPFolder
directly uses the EnsureFolderPathImplementation
extension.
When 5000 sub-folders exist in a folder, calling EnsureFolderPath
/EnsureFolderPathAsync
/EnsureFolderPathImplementation
results in the following error:
The attempted operation is prohibited because it exceeds the list view threshold.
I guess this is due to the loading of all sub-folders in a given folder:
pnpframework/src/lib/PnP.Framework/Extensions/FileFolderExtensions.cs
Lines 913 to 916 in fc213f2
Also, I guess that this is related to pnp/powershell#2286.
Steps to reproduce:
Connect-PnPOnline -Interactive "... your site ..."
1..5005 | ForEach-Object { Resolve-PnPFolder -SiteRelativePath "SitePages/testFolder/f_$_" }