SOLVED

Can not upload webpages to Site Pages under modern Group/Team Sites.

%3CLINGO-SUB%20id%3D%22lingo-sub-135342%22%20slang%3D%22en-US%22%3ECan%20not%20upload%20webpages%20to%20Site%20Pages%20under%20modern%20Group%2FTeam%20Sites.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-135342%22%20slang%3D%22en-US%22%3E%3CP%3EWhile%20i%20am%20trying%20to%20migrate%20content%20from%20legacy%20sites%20to%20the%20modern%20team%2Fgroup%20sites%26nbsp%3Bi%20faced%20with%20an%20issue%20that%20it%20is%20not%20possible%20to%20upload%20%22.aspx%22%20files%20to%20site%20pages%20library.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDoes%20any%20one%20know%20if%20this%20is%20an%20expected%20behaviour%20if%20yes%20why%3F%3C%2FP%3E%0A%3CP%3EAny%26nbsp%3Bsetting%20recommendations%20which%20will%20help%20me%20to%20migrate%2Fupload%20%22.aspx%22%20files%20to%20SitePages%20library.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-135605%22%20slang%3D%22en-US%22%3ERe%3A%20Can%20not%20upload%20webpages%20to%20Site%20Pages%20under%20modern%20Group%2FTeam%20Sites.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-135605%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20got%20the%20root%20cause%20and%20the%20solution%20of%20this%20issue%20from%20Microsoft%20support%20team%20as%20below.%3C%2FP%3E%0A%3CP%3EIn%20order%20to%20allow%20the%20upload%20.%3CSTRONG%3Easpx%3C%2FSTRONG%3E%20files%20to%20the%20site%20pages%20library%20in%20modern%20group%2Fteam%20sites%2C%20the%20%E2%80%9CCustom%20Scripting%E2%80%9D%20Feature%20must%20be%20enabled%20on%20the%20group%20site.%3C%2FP%3E%0A%3CP%3ETo%20do%20so%2C%3C%2FP%3E%0A%3CP%3Eusing%20the%20SharePoint%20Online%20Management%20Shell%2C%20running%20the%20script%20%E2%80%9CSet-SPOsite%20%3CSITEURL%3E%20-DenyAddAndCustomizePages%200%E2%80%9D%20will%20allow%20.aspx%20pages%20to%20be%20uploaded%20to%20the%20group%20site.%26nbsp%3B%3C%2FSITEURL%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

While i am trying to migrate content from legacy sites to the modern team/group sites i faced with an issue that it is not possible to upload ".aspx" files to site pages library.

 

Does any one know if this is an expected behaviour if yes why?

Any setting recommendations which will help me to migrate/upload ".aspx" files to SitePages library.

1 Reply
best response confirmed by Rajashekhar Sheelvant (Occasional Contributor)
Solution

I have got the root cause and the solution of this issue from Microsoft support team as below.

In order to allow the upload .aspx files to the site pages library in modern group/team sites, the “Custom Scripting” Feature must be enabled on the group site.

To do so,

using the SharePoint Online Management Shell, running the script “Set-SPOsite <SiteURL> -DenyAddAndCustomizePages 0” will allow .aspx pages to be uploaded to the group site.