Skip to content

pete-msft/Migrate-Canvas-Apps

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Migrate Canvas Apps

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

Installation and configuration

Create Entra ID application registration

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.

  1. Open the application blade in Microsoft Entra portal Entra ID App Registrations

  2. Click New registration

    image

  1. Provide a name for the app and click Register

    image

  1. Copy Application (client) ID and Directory (tenant) ID from the Overview page to notepad for example

    image

  1. Browse to Certificates & Secrets blade anc click + New client secret

    image

  1. Define description for the secret and select expiration time

    image

  1. Copy client secret value to notepad

    image

  1. Browse to API permissions blade and click + Add a permission

    image

  1. Select APIs my organization uses, then search for PowerApps and select PowerApps Service

    image

  1. Select Delegated permissions, then select User permission and click Add permissions

    image

  1. (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

    image

Import Migrate Canvas Apps - Prerequisites solution

This Power Platform solution installs Custom Connector

  1. Open the environment to where you want to install the solution

  2. Select Solutions from the menu and click Import solution

    image

  1. Click Browse and select the MigrateCanvasAppsPrerequisites_x_x_x_x_managed.zip solution then click Next

    image

  1. 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

    image

  1. 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

    image

  1. Select 2. Security and click Edit

    image

  1. Copy-paste the Client Secret and click Update connector

    image

  1. When connector is updated, scroll down to bottom of the page and copy Redirect URL

    image

  1. Move back to Entra ID application registration we did in the first step and in the Overview page click Add Redirect URI

    image

  1. Click +Add a platform
image
  1. Select Web

    image

  1. Paste URL to the Redirect URIs field and click Configure

    image

  1. Go back to custom connector configuration, select 5. Test and click

    image

  1. Create new connection by cliking Create and login with your account

    image

  1. (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"
       ]
    }
    
    image

Import Migrate Canvas Apps solution

  1. Browse to Solutions of the environment and click Import solution

    image

  1. Click Browse and select the MigrateCanvasApps_x_x_x_x_managed.zip solution then click Next

    image

  1. Verify that all the connection are created. If not then click three dots next to connector to create new connection

    image

  1. Solution import takes couple minutes


How to use the tool

  • 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

    image
    image


  1. Run the Migrate Canvas Apps app

    image

  1. Consent all connection by clicking Allow

    image

  1. Select source environment

    image

  1. Select the app you want to migrate. This will run GetPacjageResources flow to fetch all related resources of the app like flows and connections

    image

  1. Select target environment

    image

  1. 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.

    image image

    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


  1. 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

    image

  1. Click Migrate to start the app migration. It takes few minutes depending how many related resources there are in the app

    image

  1. If migration was succefull then click Next Step to move to the next step of the process

    image

  1. 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

    image

  1. 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

    image

    If you shared the app then when sharing is completed you should see the green success icon for each permission like below

    image

  1. In this step you have following options

    • Rename app in source environment by appending "(MIGRATED)" to the end of the app display name

    • Remove all the other permissions except your own

    • Remove the old version from source environment


      image

  1. In last step you can send an email notification to all the users and groups about the migration (group members are not extracted, so email is send to group address). Email contains app link to the new app in target environment

    image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published