The process of building custom applications and tools that interact with Microsoft SharePoint, including SharePoint Online in Microsoft 365.
Hello TonyLandicho-3302
Thanks for raising this question on the Q&A forum.
I wanted to clarify an important point regarding modern page migration. Based on Microsoft’s guidance and ShareGate’s official documentation, migrating modern ASPX pages between modern sites requires Custom Script to be temporarily enabled on the destination site. This is due to SharePoint Online’s NoScript security policy, which prevents migration tools from creating or modifying ASPX pages while DenyAddAndCustomizePages is set to 1
If you’re using ShareGate, the recommended approach is:
- Temporarily enable Custom Script on the target site using the SharePoint Online Management Shell.
- Run the migration again.
- Re-disable Custom Script after the migration completes to restore the expected security posture.
References:
SPMT supported SharePoint web parts
Copying to a Microsoft 365 Site Collection requires Custom Scripts to be enabled at the destination
Note: This information is provided as a convenience to you. These sites are not controlled by Microsoft, and Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please ensure that you fully understand the risks before using any suggestions from the above link.
Hope this information helps.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.