{"id":2287,"date":"2025-05-05T16:14:17","date_gmt":"2025-05-05T14:14:17","guid":{"rendered":"https:\/\/expinit.com\/en\/?post_type=tech&#038;p=2287"},"modified":"2025-05-05T16:15:30","modified_gmt":"2025-05-05T14:15:30","slug":"how-to-migrate-sharepoint-library-between-tenants","status":"publish","type":"tech","link":"https:\/\/expinit.com\/en\/tech\/how-to-migrate-sharepoint-library-between-tenants\/","title":{"rendered":"How to migrate SharePoint library between tenants?"},"content":{"rendered":"\n<p>You may not have come across the issue with data migration between two Microsoft 365 tenants. In the following text I would like to show how to handle SharePoint data (library) migration in these quite complicated scenario.<\/p>\n<h2>What&#8217;s the issue?<\/h2>\n<p>If you start to seriously deal with the topic, you will encounter a lot of obstacles and pitfalls and you will start to think, what is the right scenario? You will surely come across Microsoft documentation (e.g. <a href=\"https:\/\/learn.microsoft.com\/en-us\/microsoft-365\/enterprise\/cross-tenant-sharepoint-migration?view=o365-worldwide\" target=\"_blank\" rel=\"noopener\">here),<\/a> but in my opinion, it will not only widen the circle of doubts for the beginner, but rather than guide him to the only right way. Example questions to start solving:<\/p>\n<ul>\n<li>How to script and test the whole thing? After all, SharePoint PowerShell scripts are not a trivial task.<\/li>\n<li>How do I connect transparently to both tenants and will I have sufficient privileges?<\/li>\n<li>How about transferring user permissions, and what about metadata? And what are the permissions where anyway?<\/li>\n<li>Are some files shared externally and what about those links?<\/li>\n<li>Will I be able to do the transfer repeatedly, or in batches?<\/li>\n<\/ul>\n\n\n\n<h2>Our solution<\/h2>\n<p>Not only for the above reasons, we decided to try to create a tool that would not require scripting in PowerShell, but would have a simple interface and solve the above problems. The result of our efforts is the first version of a migration tool that not only handles the transfer of library data between different tenants, but of course also between libraries within a tenant. The solution is built on our libraries using SharePoint CSOM and requires absolutely minimal configuration on the Microsoft 365 side from the user. The only thing that needs to be done before actually using the migrator is to set permissions in both tenants using the so-called application credentials &#8211; <a href=\"https:\/\/learn.microsoft.com\/en-us\/entra\/identity-platform\/permissions-consent-overview\" target=\"_blank\" rel=\"noopener\">https:\/\/learn.microsoft.com\/en-us\/entra\/identity-platform\/permissions-consent-overview<\/a>. Key elements of the application?<\/p>\n<ul>\n<li>Visual preview of the structure of both the source and target libraries<\/li>\n<li>Re-transfer capability, ability to transfer library data on a directory by directory basis<\/li>\n<li>Retrieve users, groups and permissions from the source library and easily map them to the target identities<\/li>\n<li>Comprehensive audit trail view of permissions in libraries with the ability to print a tree structure<\/li>\n<li>&#8230; and much more<\/li>\n<\/ul>\n<p>Of course, we know that some features are missing from the tool and we are counting on them in future releases. These include file metadata transfer, extending the migration options to List type entities and more detailed permissions audit generation across the library (tenant).<\/p>\n\n\n\n<h2>How to use our SharePoint library migrator?<\/h2>\n<p>So what does the tool look like and how to use it?<\/p>\n<ol>\n<li>Once you have done the correct setup within M365, just configure the parameters directly in the migrator and connect to both libraries.<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2282\" src=\"https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig01-300x255.png\" alt=\"\" width=\"300\" height=\"255\" srcset=\"https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig01-300x255.png 300w, https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig01-768x652.png 768w, https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig01-139x118.png 139w, https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig01.png 942w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/li>\n<li>Load the users and groups, and map them to the target identities.<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2283\" src=\"https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig02-300x136.png\" alt=\"\" width=\"500\" height=\"227\" srcset=\"https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig02-300x136.png 300w, https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig02-1024x466.png 1024w, https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig02-768x349.png 768w, https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig02-244x111.png 244w, https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig02.png 1335w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/li>\n<li>Perform a migration of the selected directory and apply permissions in the target library<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2284\" src=\"https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig03-300x255.png\" alt=\"\" width=\"400\" height=\"340\" srcset=\"https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig03-300x255.png 300w, https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig03-768x654.png 768w, https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig03-139x118.png 139w, https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig03.png 940w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Check permissions<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2285\" src=\"https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig04-300x223.png\" alt=\"SharePoint permissions\" width=\"500\" height=\"372\" srcset=\"https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig04-300x223.png 300w, https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig04-1024x763.png 1024w, https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig04-768x572.png 768w, https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig04-158x118.png 158w, https:\/\/expinit.com\/wp-content\/uploads\/2025\/05\/SAFOMig04.png 1117w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/li>\n<\/ol>\n\n\n\n<p>Are you interested in our approach to the issue? Do not hesitate to <a title=\"Contact\" href=\"https:\/\/expinit.com\/en\/contact\/\">contact us<\/a>, either about the above mentioned tool or about any SharePoint environment consulting (also on-premises).<\/p>\n<p>We are looking forward to hearing from you. Josef Dvo\u0159\u00e1k<\/p>\n","protected":false},"featured_media":0,"template":"","acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/expinit.com\/en\/wp-json\/wp\/v2\/tech\/2287"}],"collection":[{"href":"https:\/\/expinit.com\/en\/wp-json\/wp\/v2\/tech"}],"about":[{"href":"https:\/\/expinit.com\/en\/wp-json\/wp\/v2\/types\/tech"}],"wp:attachment":[{"href":"https:\/\/expinit.com\/en\/wp-json\/wp\/v2\/media?parent=2287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}