Skip to content

Converts SharePoint Data sources for the MS Flow and PowerApps to a new tenant of your choice.

License

Notifications You must be signed in to change notification settings

Zerg00s/FlowPowerAppsMigrator

Repository files navigation

SharePoint Online Windows Version

Flow & Power Apps Migrator

Have you ever tried moving canvas apps or cloud flows across Microsoft 365 tenants or sites? This is a common task when deploying apps and flows to production. Apps and flows must be exported, and imported, and SharePoint actions must be manually updated. These manual updates are error-prone and labor-intensive. Flow & Power Apps Migrator automatically converts exported flows and apps to be compatible with the target environment.

Flow & Power Apps Migrator also helps you migrate SharePoint lists that are used as a dependency for your Apps and Flows. There is an interactive UI form that lets you do just that.

Finally, the Flow & Power Apps Migrator converts SharePoint List Forms customized with Power Apps.

Download the latest version

  

Watch a Demo

Prerequisites

  • PowerShell 5.0 or later.
  • Make sure that the SharePoint site exists in the target environment. You don't have to create Lists and Libraries because this tool will do it for you.
  • Download the latest version of the Flow & Power Apps Migrator.
  • Extract the ZIP package.
  • Open a regular Windows PowerShell command prompt.
  • Navigate to the extracted folder.
  • Unblock the script files using the following command: Get-ChildItem -Recurse | Unblock-File

Migrate-able artifacts

Artifact Support
Standalone Canvas Power Apps
Customized SharePoint List Forms Canvas apps ✔ This works again since September 2022
Canvas Power Apps that trigger Flows ✔ (flows are also migrated)
Standalone Cloud Flows
Standalone Desktop Flows
Standalone Model-driven apps N/A (not tested)
Solutions containing multiple canvas apps and flows
SharePoint Connectors
Non-SharePoint Connectors such as Word for Business
SharePoint Lists
SharePoint Libraries
Cross-Language Lists migration ❌ Both source and target sites must be created with the same language. Otherwise, you'll get the 0x80070005 (E_ACCESSDENIED) error
JSON List customizations
JSON Column formatting
SharePoint data
Content Types ✔ (migrated automatically)
Lookup fields ⚠️ (migrated only if you migrate the lookup list, too)
Data Sources located in a single site
Data Sources located in multiple sites and sub-sites

Convert flows, apps and solutions

Export flows, apps and solutions

Export all of your flows:

Export all of your apps:

2. Place exported flows, apps and solutions in the src folder

3. Run Migrate-Packages.bat

The scripts will iterate through all ZIP files inside the \src directory and convert them to be compatible with the new Microsoft 365 tenant or site.

  • Run Migrate-Packages.bat script

  • Enter source site URL and target site URL:
  • Keep MIGRATE_LISTS property set to True if you want to migrate SharePoint lists and libraries.

image

  • Select lists and libraries to migrate

image

  • Sit back and wait for the lists and libraries to be migrated and the conversion process to finish.

4. Navigate to the \dist folder and collect converted flows, apps and solutions

5. Import converted flows, apps and solutions

Now you can import your flows and apps to the destination tenant. All SharePoint actions will now be converted and point to the new location.

Power Apps data sources are all converted

Flow actions are also converted

How it works

Flow & Power Apps Migrator finds all unique IDs pointing to the source SharePoint site and replaces them with the destination IDs. resourceMapping.csv contains the mapping of these IDs.

Limitations

  • Does not support macOS and Linux.
  • Only SharePoint data sources are updated.
  • ZIP packages might not be converted if placed in a long path name on disk. For this reason, try placing the migrator as close to the root drive as possible.

Preparing a deployment package for your Clients and Partners

What if you created an app or flow you want your Client or Partner to have? You can package your SharePoint Lists and the apps and flows in a single package. Then you would like to hand over this package and simple installation instructions. Guess what? There is a script that prepares this package automatically for you.

Prepare-Deployment-Package-for-Client.bat script prepares a deployment package you can share with your Clients or Partners.

On your end

  • Run Prepare-Deployment-Package-for-Client.bat

image

  • Export your Solutions, Power Apps and Flows and save them to the package\src directory

image

  • Send the package directory to your Client or Partner.

image

On the Client's side

  • If it does not already exists, create a SharePoint Online site. It will contain SharePoint Lists and Libraries that Power Apps/Flows require.
  • Open the package directory.
  • Run Convert-Packages.bat script.
  • Provide target site URL.
  • Import all solutions, flows and apps from the dist directory.

Note: Convert-Packages.bat will:

  • Deploy SharePoint lists and libraries (if you want to package them)
  • Convert Apps and Flows from src and saves them to 'dist'.

image

Migrating Power Apps SharePoint List Form

SharePoint List forms customized with Power Apps can be migrated if you follow these steps:

  • Navigate to your SharePoint List

  • Click on one of the SharePoint list items

  • Click on the ellipsis (3 dots) > Customize with Power Apps:

  • Power apps Editor will open.

  • Click on File > See all versions

  • Click Export package:

  • Type your app name

  • Select "Create as new" under Import setup

  • Click Export

  • Place the exported package in the \src directory
  • Run Migrate-Packages.bat script

Latest Updates

3.10.0 Version - 2024-01-18

Changes

  • Removed migration of the column formatting JSON. This was causing the issues with the migrated lists.
  • Removing the migration of several out-of-the-box content types.

3.9.8 Version - 2023-09-25

Changes

  • Added additional tips to the users who are getting the 0x80070005 (E_ACCESSDENIED) error.

3.9.7 Version - 2023-09-22

Changes

3.9.6 Version - 2023-09-06

Changes

3.9.5 Version - 2023-08-30

Changes

  • Removed the REST API call that was causing 403 error for some users.

3.9.4 Version - 2023-08-06

Changes

  • The pnp:SiteFields node is now automatically removed from the Lists.xml PnP provisioning template if it's empty. An empty node was causing the "invalid template" errors.

3.9.3 Version - 2023-07-14

Changes

  • Removing more fields causing the infamous 0x80070005 (E_ACCESSDENIED) error.
  • Trimming trailing slashes in the site URLs

Known issues

  • Migrated lists with custom content types end up with an extra content type that should be deleted manually after migration.
  • Migrated lists might need fields added to the content type or a form. In some cases, migrated lists show only the Title in the edit form.

3.9.2 Version - 2023-07-05

Changes

  • Removing Site fields causing the infamous 0x80070005 (E_ACCESSDENIED) error.

Known issues

  • Migrated lists with custom content types end up with an extra content type that should be deleted manually after migration.
  • Migrated lists might need fields added to the content type or a form. In some cases, migrated lists show only the Title in the edit form.

3.9.1 Version - 2023-06-11

Changes

Known issues

  • If the source and the target sites were created using different languages, then the app migrator will fail with the Access is denied (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) error.
  • Migrated lists with custom content types end up with an extra content type that should be deleted manually after migration.
  • Migrated lists might need fields added to the content type or a form. In some cases, migrated lists show only the Title in the edit form.

3.9.0 Version - 2023-06-07

Changes

  • Added an ability to run migrations using SharePoint-only App ID and App Secret. Use the config\migrator-config.json file to do it:
{
    "source-site-url": "",
    "target-site-url": "",
    "source-site-app-id":"",
    "source-site-app-secret":"",
    "target-site-app-id":"",
    "target-site-app-secret":""
}

Known issues

  • If the source and the target sites were created using different languages, then the app migrator will fail with the Access is denied (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) error.
  • Migrated lists with custom content types end up with an extra content type that should be deleted manually after migration.
  • Migrated lists might need fields added to the content type or a form. In some cases, migrated lists show only the Title in the edit form.

3.8.6 Version - 2023-05-10

Changes

  • Fixed the issue related to the Trace log causing the migratory to fail.

3.8.5 Version - 2023-02-20

Changes

  • Users connected to the source and target sites are now displayed in the console for easier troubleshooting.

3.8.4 Version - 2023-02-03

Changes

  • Fixed the issue caused by lists having multiple personal views.

3.8.3 Version - 2022-09-30

Changes

  • Added a check for the E_ACCESSDENIED error.

Known issues

  • If the source and the target sites were created using different languages, then the app migrator will fail with the Access is denied (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) error.
  • Migrated lists with custom content types end up with an extra content type that should be deleted manually, after migration.
  • Migrated lists might need fields to be added to the content type or a form. In some cases, migrated lists show only Title in the edit form.

3.8.2 Version - 2022-09-28

Changes

  • Added a check of the source and target site permissions. If the user does not have the required permissions, the app migrator will stop and display an error message.

Known issues

  • Occasional error: Access is denied (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). This error typically has nothing to do with permissions. It is hard to diagnose, but one of the fixes is to delete a target site and rerun the app migrator.
  • Migrated lists with custom content types end up with extra content types that should be deleted manually, after migration.
  • Migrated lists might need fields to be added to the content type or a form.

3.8.1 Version - 2022-09-04

Bug fixes

  • Fixed an issue with lists not being migrated

Known issues

  • Migrated lists with custom content types end up with extra content types that should be deleted manually.
  • Migrated lists might need fields to be added to the content type or a form.

3.8 Version - 2022-09-04

New features

  • Added ability to Clear Credentials cache (helpful when your credentials pop-up opens and closes automatically, without prompting you to enter your credentials)

Bug fixes

  • Fixed an issue with migrating between non-English SharePoint sites.

Known issues

  • Migrated lists with custom content types end up with extra content types that should be deleted manually.
  • Migrated lists might need fields to be added to the content type or a form.

3.7 Version - 2022-09-01

New features

  • SharePoint list forms customized with Power Apps are now migrated by this tool. Credits to kvadratnymedved and amariak for providing a solution. 🙏

Known issues

  • Migrated lists with custom content types end up with extra content types that should be deleted manually.
  • Migrated lists might need fields to be added to the content type or a form.
  • Flow & Apps Migrator might cache your user credentials and not prompt you for them again. In this case, you will need to follow the steps described in this issue

3.6 Version

New features

  • Added an ability to migrate flows that refer to the List and Library views. This was done to address the issue List Views not Migrated submitted by Juistin

Known issues

  • SharePoint list forms customized with Power Apps are no longer migrated by this tool. There is an issue I am still working on.

3.5 Version

New features

  • Added an ability to migrate content types and columns. These will be automatically migrated if your lists have any custom content types.

Known issues

  • SharePoint list forms customized with Power Apps are no longer migrated by this tool. There is an issue I am still working on.

3.4 Version

  • Fixed a major bug preventing export-importing for the lists and libraries.

3.3 Version

  • Made console output more clear.

3.1 Version

  • Fixed a bug that corrupted solution zip files during the conversion process. It made it impossible to import solutions.

3.0 Version - Major update

New features added:

  • Migrate-Packages.bat script now migrates SharePoint lists and libraries that your Apps and Flow depend on.
  • Added Prepare-Deployment-Package-for-Client.bat script to prepare a deployment package to share with your Clients or Partners. Running this script will generate a package directory you can send to your Clients and Partners. Distribution of your apps and flows is now easier than ever.

2.1 Version

New feature added:

  • added support for solution migration. Thanks to Mark Doria for helping with this feature.

Support this project

I like coffee and consume lots of it while coding. If you want to support me, you can click on the "buy me a coffee" button:


Buy Me A Coffee