SOLVED

Help deleting 'folder' in SPO?

%3CLINGO-SUB%20id%3D%22lingo-sub-2704982%22%20slang%3D%22en-US%22%3EHelp%20deleting%20'folder'%20in%20SPO%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2704982%22%20slang%3D%22en-US%22%3E%3CP%3EWe've%20gotten%20a%20into%20a%20strange%20situation%20with%20a%20modern%20SharePoint%20Online%20site%20and%20could%20use%20some%20help%2Fideas%20on%20how%20to%20get%20out%20of%20it%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%20file%20was%20deployed%20with%20the%20Feature%20framework%20style%20of%20deployment%20to%20a%20path%20of%20%2FSiteAssets%2Fmyfile.ext.%20However%2C%20this%20happened%20%3CEM%3Eprior%3C%2FEM%3E%20to%20the%20Site%20Assets%20library%20actually%20being%20created%20by%20the%20'just-in-time'%20model%20used%20on%20modern%20sites.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20a%20result%2C%20the%20site%20now%20has%20a%20root%20'folder'%26nbsp%3B%3CSPAN%3Enamed%20SiteAssets%20and%20it%20is%20%3CSTRONG%3Eblocking%3C%2FSTRONG%3E%20the%20JIT%20creation%20of%20Site%20Assets%20library.%20When%20I%20say%20'folder'%26nbsp%3Bthink%20web%2FIIS%20folder%2C%20NOT%20a%20SharePoint%20folder%20in%20a%20library.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EHow%20would%20one%20delete%20this%20kind%20of%20'folder'%20such%20that%20the%20Site%20Assets%20library%20can%20actually%20be%20created%3F%20I've%20tried%20various%20forms%20of%20SPO%2FPnP%20PowerShell%20and%20none%20of%20the%20cmdlets%20seem%20to%20work%20with%20this%20kind%20of%20'folder'%20%3A(%3C%2Fimg%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EAny%20help%2Fideas%20would%20be%20MUCH%20appreciated...%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2724512%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20deleting%20'folder'%20in%20SPO%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2724512%22%20slang%3D%22en-US%22%3EYou%20should%20be%20able%20to%20see%20the%20folder%20if%20you%20check%20the%20content%20from%20Web.RootFolder%20objective.%20So%20connecting%20to%20web%20level%20and%20then%20access%20the%20RootFolder%20property%20from%20there.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2733333%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20deleting%20'folder'%20in%20SPO%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2733333%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%2C%20Vesa.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20indeed%20able%20to%20see%20the%20folder%20but%20unable%20to%20delete%20it.%20Even%20as%20Site%20Collection%20Administrator%2C%20I%20receive%20access%20denied%20using%20CSOM%20in%20PowerShell.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRIKE%3EThe%20customer%20has%20chosen%20to%20delete%20the%20site%20and%20start%20over%2C%20so%20it%20is%20no%20longer%20an%20issue%20at%20this%20point.%20%3C%2FSTRIKE%3EEDIT%3A%20The%20customer%20has%20found%20another%20site%20with%20this%20issue%20and%20doesn't%20want%20to%20start%20over%20with%20that%20one%20because%20too%20much%20other%20work%20has%20already%20been%20done%20on%20the%20site.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20wonder%20how%20much%20time%20is%20really%20being%20saved%20by%20skipping%20the%20creation%20of%20Site%20Assets%20during%20site%20creation%20and%20if%20it%20is%20really%20worth%20it.%20It%20can't%20take%20much%20longer%20than%20creating%20the%20Style%20Library%20and%20Form%20Templates%2C%20which%20we%20don't%20even%20really%20use%20anymore...%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

We've gotten a into a strange situation with a modern SharePoint Online site and could use some help/ideas on how to get out of it:

 

A file was deployed with the Feature framework style of deployment to a path of /SiteAssets/myfile.ext. However, this happened prior to the Site Assets library actually being created by the 'just-in-time' model used on modern sites.

 

As a result, the site now has a root 'folder' named SiteAssets and it is blocking the JIT creation of Site Assets library. When I say 'folder' think web/IIS folder, NOT a SharePoint folder in a library.

 

How would one delete this kind of 'folder' such that the Site Assets library can actually be created? I've tried various forms of SPO/PnP PowerShell and none of the cmdlets seem to work with this kind of 'folder' :(

 

Any help/ideas would be MUCH appreciated...

 

 

4 Replies
best response confirmed by Jim Duncan (Occasional Contributor)
Solution
You should be able to see the folder if you check the content from Web.RootFolder objective. So connecting to web level and then access the RootFolder property from there.

Thanks, Vesa.

 

I am indeed able to see the folder but unable to delete it. Even as Site Collection Administrator, I receive access denied using CSOM in PowerShell.

 

The customer has chosen to delete the site and start over, so it is no longer an issue at this point. EDIT: The customer has found another site with this issue and doesn't want to start over with that one because too much other work has already been done on the site.

 

I wonder how much time is really being saved by skipping the creation of Site Assets during site creation and if it is really worth it. It can't take much longer than creating the Style Library and Form Templates, which we don't even really use anymore...

@Vesa Juvonen 

 

Had a face-palm moment: I simply had to enable scripting on the site and then I was able to rename the folder. With that done, Site Assets was able to provision itself on-demand.

 

I'm not as think as I smart I am ;)

 

 

Interesting that it's a requirement for that, but thanks for sharing. Good for others to know if they will run into this scenario.

SharePoint works in mysterious ways - it's not about being smart by knowing, rather being smart on testing different options - which you did.