Copy Items/Files between SharePoint Sites in different Tenants using Power Automate #PowerAutomate

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone in today's video I will show you how you can use Microsoft power automate to move or copy list items or files documents from one SharePoint tenant to another SharePoint tenant so stay tuned [Music] [Music] I'm Deepak srivastava and welcome back to my channel so in today's video we are going to learn how we can migrate documents Or List item from one SharePoint tenant to another SharePoint tenant there can be the scenario where you want to move files or List item from your development SharePoint to your production SharePoint those can be different tenant and if those are the different tenant then you may need to find a way to easily move those documents power automate can be one of the options that you can use or select to do such kind of migration so for today's demonstration what I have I have one of my tenant here that is the one that you are seeing currently and here I have one document library that I'm calling document migration destination this is my you can say the destination tenant or SharePoint site collection under that tenant where I want to move documents from my source SharePoint tenant similarly I also have created one list that is again my destination list where I want to move or copy list item from my source SharePoint tenant and this is my source tenant as you can see here this is a different tenant here as compared to the one that we have seen for the destination here I have a document Library where I have lots of files and similarly I have a list where I have different list item created okay so the requirement that I have right now is to move all these files from this document library to my destination SharePoint library that is the different tenant okay and I want to move this list item or copy this list item to my destination list okay so the first thing first we all know what power automate can do now we're going to learn how we can use one single power automate flow to connect to these two different tenants and complete our requirement that is copying or moving the documents Or List item between these two okay so I'm going to show you both options uh running the flow on your Source tenant or running a flow to your destination right it will work both way so first I'll start from my source standing I'll log into my power automate here okay so I logged into Power automate here the first thing that you need to understand when you are working on two different tenant is the connection okay when I'm running this power automate flow into my current talent I am automatically logged in so the connection that I'm going to use is going to be there if it's not there I can easily create it but because we are working on copying or moving the documents Or List item between two tenant you need to make sure that you are having the right connection to both of the tenant now how this is going to work so to make that work the first thing that is most important you have to have access to both the tenant or you have you should have an ID or login that allow you to connect to the other tenant okay if you don't have that this method won't work so first thing you do you go to the data you go to the connections and you will create a new connection for your destination tenant so what I need to do now I need to create a connection for my destination tenant that is going to be this one okay so for that what I'm going to do I'm going to click on new connection because I'm working on SharePoint so we will select the SharePoint we'll click create and then it's going to present you a login screen this is where you will select the username or password that you are using or that you will be using to connect to the destination tenant so remember make sure that you are selecting the right email address that had access to the test news and tenant and create that connection once you complete that connection part I already have created so as you can see here this is my connection that I have created connected to my destination tenant and this is what I'm going to use for this particular flow okay this part is very important so make sure that you complete this correctly and you should have connected not the fixed connection or any error here okay now I will go to the flow click on the create you can select any type based on your particular requirement for the triggering of the flow I'm going to use the instant I'm going to select manually trigger flow click create okay so flow got created now the very first thing that I will do I'll of course rename it okay and then I'm going to add my first step the first step is because I'm copying the file I need to get all the files right so I'm going to use the SharePoint get items okay now because we are working on this two tenant scenario each action you need to make sure that has the right connection in use right now this is the get item so this should be from your source so as you can see here it's right now using this one look at the tenant it's different so I'm going to make sure that I'm using the right connection for this so this is my current Source tenant connection okay once I drop click on the site address you will realize if I'm not using the right connection I won't see the right sites here this is my site here where I have this document migration source source document Library okay and in the list name because we are using that items it's not gonna automatically present you the document Library so click on the enter custom value and then you can paste the library name here okay I'm gonna click save just to make sure that I'm saving it first time so I won't lose it so now we have connected to the our source document list next I'm going to do I need to get the content of the file that I'm going to copy so again SharePoint connector and this time I'm going to use get file content okay so get file content action it's going to ask you the site address again check the connection make sure that you are using the right one very important and in the file identifier you can use the previous get items and look for the identifier here this one it will automatically put you in the loop that's correct because get items May or can result or bring back more than one item okay so so far what we have done we have got our items we have got the file content now the last step is very simple we need to use another SharePoint action that called create file okay create file now this time where we are creating the file we are creating the file into our destination SharePoint so this time the connection that is here is correct it is connecting to the T power work that is my destination tenant I'm going to click on the drop down I can see the site address and as you can see here this is my site address okay and here I'm going to click on this folder and this will show me all the list that I have into my destination of all the library that I have in my destination SharePoint and this is where I want to copy the file that I'm getting from my source select that file name that you are getting from from here so this is going to be file name with extension remember to keep with extension otherwise the file that will copy will not open correctly and then file content you know we are using that file content so use that perfect right so workflow is ready I'm going to save it and test it one thing to reconform that you have correctly use all the connection you should get to connection both are per SharePoint but one is going to be for your Source another one is going to be for your destination SharePoint click continue on Flow okay so the flow is running and if I go to my destination SharePoint now you will start seeing the files popping in pretty simple pretty straightforward so I'll let that flow run we were running that flow from the source now I'm going to use the same concept and run it from the destination also okay so now I'm on my destination power automate now and as you have seen that you need to make sure that you are creating the connection before you start so here right now we are in this tenant but I need we need to create a connection for our source tenant this time okay so this is my source standard connection I have already created you know how to create the connection click on new connection it's going to open the login window provide your this time provide your source login name and password and create that connection once you've done that I'm going to create the simple approach or the same approach you can use any trigger I'm going to use instant flow manually triggered flow create okay I'm going to give a name okay now this time what we are going to do pretty much same thing the first step to get the items that you want to copy your move right so SharePoint get items you know yes you're correct we need to make sure that the right connection is in use and this time it's the right connection it should be your Source because you are trying to get items from your Source list now this will show me all of my site I'm going to select this one the list that I'm going to use is CT Master the next step is much more simpler as file because because we are moving the items we don't need to use that cat I get content that we use for the file so here I am going to Simply search for SharePoint and then create item okay yes correct select the right connection this time I need to select my destination connection here and my destination list okay once you select the list it will of course give you the column name and another thing right when you are moving the the list item you don't need to match all the columns if you want to move all the information then yes you need to match all the columns so if your Source list has six column and if you want all six column information moved to the destination you need to make sure that your lists are identical and have the same column there and more or less it should be the same column type you can use a different name if you want to like for example I'm using here columns it's same as my destiny as my source column it doesn't need to be you can have any column name as you want just make sure that the type is the same so when I'm moving from text it will move to the text number to number so it will be easy migration right here title I know I'm getting the title to get items it's going to add the loop because get items can bring you more than one item and the columns I have that column click save okay so I save it now I'm going to click on the test similar concept you should get to connection if you are moving between two different tenant click continue run close to on the flow should be running and if I go to my destination list it should start getting the items from my source right and if you look at the documents yes in really quick time we were able to move all these files from our source and also the list item from the source to the destination awesome right now there are a few things that you need to notice or you need to keep remembering when you are using it if you have lots and lots of items that you are trying to move be careful from the performance point of view if you are moving lot of item the flow can be slower as you start moving thousands and thousands of documents and items so if you are trying to use this for heavy data migration then you need to think about maybe upgrading your license the second one also remember there is a limit of 100 in the get items so if you are using get items and you know there are more than 100 items then you need to make sure that you are updating that settings to whatever number that you want here put the number here this is going to limit the 5000 so keep those things in mind other than that this is pretty simple approach to move the documents and list item I'm hoping this will help you in your scenario where you want to move between two different tenant don't forget to leave a comment if you have any question thanks for watching keep learning thank you very much
Info
Channel: Deepak Shrivastava
Views: 9,710
Rating: undefined out of 5
Keywords: Copy Items/Files between SharePoint Sites in different Tenants using Power Automate, sharepoint, office 365, sharepointtutorial, copy files from one sharepoint site to another, sharepoint file copy and move, copy files between sharepoint tenants, power automate copy files in different tenant, copy files from one folder to another, move sharepoint files to another tenant, copy sharpeoint file, sharepoint files copy using power automate, power automate & sharepoint, deepak flow
Id: S_nb6MRprug
Channel Id: undefined
Length: 12min 55sec (775 seconds)
Published: Wed Dec 07 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.