NOTE!!! THERE SEEMS TO A BUG OR PRODUCT BEHAVIOUR CHANGE REGARDING APP FLOWS. AFTER IMPORT THE FLOW(S) NEED TO BE RE-ADDED TO THE APP
Solution for migrating Canvas Apps and their related resources like Flows between environments. It includes simple Canvas App with supporting Cloud Flows and Custom Connector to do the migration by automating Power Platform legacy export/import functionality
As this solution uses Custom Connector, all the users need to have standalone Power Apps license Power Apps Premium or Power Apps per App
Solution uses Power Platform BAP API to export and import packages, so we need to create Microsoft Entra ID application registration for the user authentication. Follow the steps below to register new Entra ID application. Depending of your tenant settings, you might need Global Administrator permissions to be able to register new application.
-
Open the application blade in Microsoft Entra portal Entra ID App Registrations
-
Click New registration
-
Copy Application (client) ID and Directory (tenant) ID from the Overview page to notepad for example
-
(optional) Grant admin consent for the application. If you do not do this then all users need to grant consent in the first use of the Canvas App migration tool
This Power Platform solution installs Custom Connector
-
Open the environment to where you want to install the solution
-
Select Solutions from the menu and click Import solution
-
Click Browse and select the MigrateCanvasAppsPrerequisites_x_x_x_x_managed.zip solution then click Next
-
Fill-in Client ID and Tenant ID you copied to notepad and click Import. NOTE! Current version support now only plaintext client secret which need to be set after solution import
-
After solution is imported, select Custom Connectors from the menu and click the pencil icon of the Migrate Canvas Apps custom connector to open it in edit mode
-
Move back to Entra ID application registration we did in the first step and in the Overview page click Add Redirect URI
- Click +Add a platform
![image](https://private-user-images.githubusercontent.com/8307644/315888327-94bc0714-16ee-44c8-92c0-71f683964589.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2Njk1ODYsIm5iZiI6MTczOTY2OTI4NiwicGF0aCI6Ii84MzA3NjQ0LzMxNTg4ODMyNy05NGJjMDcxNC0xNmVlLTQ0YzgtOTJjMC03MWY2ODM5NjQ1ODkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTZUMDEyODA2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MGY4MjAwZjgxMDE1NzRiMzQyN2I5MzBlZGQyYjYzZDdlMGRmZmM4OTQ2NzMxZDU1YWU4ZDExYjY0ZWYwYjI5MCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.OeRUIyNBMaOzLY0TVsNDpzUwnRWRr3JfX6kJ-6LgKqo)
-
(optional) You can test the connector by defining EnvironmentID and use the following body with your own application ID which you can find from the Canvas App details page. If you get response 200 and can see the application details in the response body, then custom connector is configured correctly
{ "baseResourceIds": [ "/providers/Microsoft.PowerApps/apps/REPLACE-WITH-YOUR-APPID" ] }
-
Verify that all the connection are created. If not then click three dots next to connector to create new connection
- Solution import takes couple minutes
-
App migration status is saved to Migration Job Dataverse table and users need to have read-write permissions to this table. Solution contains own security role Canvas Apps Migration Users which grant Create, Read and Write permissions to the table, so add this security role to app app users
-
You might need to share also grant run-only user permissions to all solution flows.
Select user(s) or group(s) and define Provided by run-only user for all the connections of the flow
-
Select the app you want to migrate. This will run GetPacjageResources flow to fetch all related resources of the app like flows and connections
-
If there are flows included in the app having any connections, then you need to create all the connections before migration.
You can create new connection(s) or select existing connection(s). Connection creation opens to new browser tab for target environment. If you want to create all connections click Create All which opens own browser tab for each connection.
NOTE! Browser pop-up blocker might block opening new browser tab. If that is the case then one option is to open target environment in make.powerapps.com and manually create connections
-
After connections are created, click Refresh to fetch connections. You can still select connection you want using the dropdown control if there are multiple connections
-
Click Migrate to start the app migration. It takes few minutes depending how many related resources there are in the app
-
Select the migrated app from the list. If the app is not listed then click refresh icon to fetch your apps from target environment.
NOTE! sometimes it can take little while for the migrated app to be visible here
-
Now you should see all the permissions (if any) of the app in source environment. You can remove permissions if needed or do not share the app in target environment at all. Make the necessary changes and click Share App or click Next Step if you do not want to share the app for now
If you shared the app then when sharing is completed you should see the green success icon for each permission like below
-
In this step you have following options