Symptoms
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.
Index
Error Code
IN803-002
Details
This error occurs when you are running a migration that contains .aspx pages to a modern site.
Solution
The Custom Script feature can't be activated automatically in a modern site during the migration. Because of this, ShareGate Desktop is not able to migrate the forms, web parts, and ASPX pages. Learn more.
Note: Custom Script is disabled in a modern site when it's created in SharePoint, even if you have it enabled at the tenant level.
Microsoft 365
To resolve this in Microsoft 365, you'll need to follow the steps below to activate custom scripting using PowerShell:
- Download the SharePoint Online Management Shell.
- Open a SharePoint Online Management Shell prompt.
- Run the two following commands:
Connect-SPOService -Url https://YourDomain-admin.sharepoint.com Set-SPOSite -Identity https://YourDomain.sharepoint.com/sites/YourSite -DenyAddAndCustomizePages 0
Run your migration again, and everything should be working properly.
You should set Custom Script back to denied after the migration. To do so, you can run the script again, but this time change the -DenyAddAndCustomizePages value to "1".
SharePoint 2019
To resolve this in SharePoint 2019, you will need to follow the steps below to activate custom scripting using PowerShell:
- Open a Windows PowerShell or Windows PowerShell ISE window.
- Run the following script on your Site Collection:
$site = Get-SPSite -Identity "http://yourfarm/sites/yoursite"
$site.DenyPermissionsMask = [Microsoft.SharePoint.SPBasePermissions]::EmptyMask\
Run your migration again, and everything should be working properly.