
Hi @Fredrik_OT
Per my research, upload .aspx site templates to sharepoint modern site is not supported. It only support in SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 (classic sites only), and SharePoint Online (classic sites only). Please refer to the following document
As a workaround, I would recommend you to use Site Page API. Please follow the steps
- Create the page via
POST /sites/{site-id}/pages
, which returns the newly created site Page. - Publish the new page -->
POST /sites/{siteId}/pages/{pageId}/publish
Here is the similar issue with yours
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.