When running a migration to a SharePoint Online environment, you receive a variation of this message:
The page could not be created. Custom Scripting might be deactivated on the destination site or you might not have sufficient permissions.
This error occurs when you are running a migration that contains .aspx pages, and the SC attribute DenyAddAndCustomizePages is set as true.
You can resolve this using PowerShell by following these steps:
- Download and install Sharepoint Online Management Shell.
- Open the Sharepoint Online Management Shell when prompted.
- Run the two following commands:
Connect-SPOService -Url https://YourDomain-admin.sharepoint.com
Set-SPOSite -Identity https://YourDomain.sharepoint.com/sites/YourSite -DenyAddAndCustomizePages 0
- Attempt your migration again.