SOLVED

Move/Copy SharePoint Pages from one Site to Another in Classic View

Brass Contributor

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?

52 Replies

@Corbenik 

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.

@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

 

Corbenik_0-1626213685007.png

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 :

 

Corbenik_1-1626213990057.png

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.

best response confirmed by Corbenik (Brass Contributor)
Solution

@Corbenik you can also copy pages, including any images on them, to a different site using a simple flow in Power Automate:
Button.png

 

Flow.png

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

@Corbenik 

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?

Not exactly, I've used basic level stuff for notifications. I wasn't aware it could be used for this purpose too
Hi RobElliott, thanks for this, I've not personally used that much of Power Automate, I think I'll have a play around with it and see if I can get it to work
Alright I managed to create my own though I don't have the copy icons like you have I do have the option now to copy to other sites. I'll be deploying this to all the other sites here

Thanks very much Rob and Steven!

@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

You're a legend Rob, thanks very much for your help in this 🙂

It looks like I've still got a lot to learn when it comes to Power Automate and exactly what it can do. Really appreciate you sharing your knowledge!

(PS. Yes, I managed to add my own button too )

@RobElliott 

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.

@Rie0205 

 

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

 

Corbenik_0-1631126997421.png

 

Hope this helps

Thank you! I will try that. Appreciate your help!!

@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

@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

 

 

 

 

@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!

Created flow and button according above but only header was copied and not the page content.
New suggestions please

@FlyingDutchman1080 

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.

JohnMoore33_0-1639747063363.png

 

Some great responses, but it strikes me as strange that for such a simple task, that Power Automate is required. I use SharePoint Designer and do a simple copy and paste, but my employer will very likely remove SharePoint Designer from our toolbox soon.
@Rie0205 Did you figure out a solution for copying the images over?
1 best response

Accepted Solutions
best response confirmed by Corbenik (Brass Contributor)
Solution

@Corbenik you can also copy pages, including any images on them, to a different site using a simple flow in Power Automate:
Button.png

 

Flow.png

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

View solution in original post