Forum Discussion
Christopher Johnson
Jun 14, 2017Brass Contributor
Access denied in SharePoint SitePages library
I am trying to create modern SharePoint pages programmatically in SitePages libraries on groups-based sites. I first attempted doing so with PowerShell, then with Flow and finally confirmed via a...
Jonathan Cardy
Jan 30, 2019Copper Contributor
Trying to upload an aspx file directly will raise the Access Denied error, but you can use the `Files.AddTemplateFile` method do it: https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-pages
GlennE888
Mar 15, 2019Copper Contributor
Does that work for you? I tried to add the page via Files.AddTemplateFile as mentioned but I get the same Access Denied Error.