Jul 13 2021 02:24 PM
Hi everyone, I've recently been tasked with moving site pages from one site to another. I've read how you could use Classic view to do this. I'm a SharePoint administrator for our company and have made myself admin of the two sites I'm working with.
Problem is, whenever I try to move/copy pages across and put the URL in, it always says I don't have right access for it and would need to request permission from the site owners (me essentially) and no matter how many times I approve myself it just keeps looping me back to the same problem.
Does anyone know what's causing this or what I'm doing wrong?
Jul 13 2021 02:54 PM
Welcome to the forums. There is a difference between the site owners group and site collection administration. Do you know which one you are?
And can you also provide some information on how you've attempted to copy the files thus far please? I'm guessing you're trying Explorer View in Classic as Copy / move functionality, the last I checked didn't work through the modern interface for site pages.
Jul 13 2021 03:09 PM
@Steven Andrews I'm the site collection admin. I switched to the classic view as I heard (and saw) that there was no way to do this with the modern interface
On clicking that copy command I get taken to the copy prompt and after filling in the necessary details like the destination URL and clicking ok :
It would ask me to request permission, and even if go through with that and then grant myself permission (which is strange as I'm already the site collection admin for both source and destination sites), when I try to copy again it says I need permission again.
Jul 14 2021 12:23 AM - edited Jul 14 2021 12:28 AM
Solution@Corbenik you can also copy pages, including any images on them, to a different site using a simple flow in Power Automate:
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Jul 14 2021 02:06 AM
The limitation here is that it's the Site Pages. The solution I was going to propose is the one that Rob has provided below. Are you familiar with Power Automate?
Jul 19 2021 02:28 PM
Jul 19 2021 02:29 PM
Jul 19 2021 05:15 PM
Jul 20 2021 02:08 AM - edited Jul 20 2021 02:08 AM
@Corbenik That copy button isn't built-in, it's added into the SharePoint list by you with JSON column formatting, for example (don't forget to change the flow ID to yours)
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"txtContent": "Copy Page to Intranet",
"customRowAction": {
"action": "executeFlow",
"actionParams": "{\"id\": \"4a16b313-496a-4c5e-b145-3cfa42438bcd\"}"
},
"style": {
"background-color": "#f14717",
"color": "#ffffff",
"outline": "transparent",
"border-width": "1px",
"border-style": "solid",
"border-radius": "5px 25px",
"border-color": "transparent",
"cursor": "pointer",
"font-size": "12px"
}
}
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Jul 21 2021 01:34 PM
Sep 08 2021 11:43 AM
Hello, I might have missed the info, but what should be the trigger for the flow you shared in the forum. I built the flow as you instructed but can't 'Run' the flow without the trigger... Any advice?
Thank you.
Sep 08 2021 11:50 AM
Not sure what @RobElliott used but for mine I used the "Instant Cloud Flow" trigger as the flow needs to be triggered manually on selecting items
Hope this helps
Sep 08 2021 11:52 AM
Sep 09 2021 12:43 AM
@Rie0205 the trigger was "For a selected file" but you have to have selected the file first in order for the flow to trigger. That was done with the JSON-formatted button in the list. You have to run it first from the button before you can then use the test at the top right in Power Automate.
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Sep 09 2021 12:45 AM - edited Sep 09 2021 12:49 AM
@Corbenik instant cloud flow isn't a trigger, it's just a type of flow (and is the one I always use whether the trigger is manual, a recurrence, something from SharePoint etc). In my example the trigger was the SharePoint "For a selected file".
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Sep 28 2021 11:41 AM
@RobElliott and @Corbenik
With the flow created as instructed, I see that the text contents are transferred perfectly. However, I didn't get images transferred to the 'Site Assets' folder. Therefore, the page looks like the attached image on the end-users screen. Am I missing something? Appreciate your help!
Nov 18 2021 01:28 PM
Dec 17 2021 05:20 AM
You can try using Create New File rather than copy. (I used another trigger instead of json button in list, my flow triggers when page is modified).
Note that you have to set specific permissions when you want to copy SitePages using Power Automate. Even if the user is owner of the site you'll get an access denied, unless you change the
"-DenyAddAndCustomizePages $false"
using powershell as explained in this blog post.
Feb 11 2022 06:53 AM
Apr 08 2022 10:35 AM
Jul 14 2021 12:23 AM - edited Jul 14 2021 12:28 AM
Solution@Corbenik you can also copy pages, including any images on them, to a different site using a simple flow in Power Automate:
Rob
Los Gallardos
Microsoft Power Automate Community Super User