The Power to Move PowerApps Customizations Between Tenants
The import/export challenge:
PowerApps is a SaaS offering from Microsoft that helps build custom business applications with limited knowledge and pain of application development or custom coding. This can also be used to design and develop custom SharePoint List Forms. As more organizations leverage Microsoft PowerApps and Flow to develop apps to work on their SharePoint platforms, they face the limitations of PowerApps in terms of publishing.
One such limitation is, upon customizing a SharePoint Site or List in one tenant, it cannot be moved to another tenant’s Site or List. This leads to a lot of redundant development and testing work. Also, the lack of porting features in PowerApps limits re-usability of code across SharePoint projects with similar requirements.
Ranked in the top 30 requested feature additions for PowerApps (with 116 votes), the import/export limitation in PowerApps is something the development community is eagerly awaiting.
Our search for the solution:
While trying to export a PowerApps package and after checking the import options, it was apparent there was no direct option to select any Site or List for the target deployment. After some analysis it was clear that to achieve this, the deployment details must be embedded inside a PowerApps App package.
The next step was to explore the exported PowerApps package. There were many files in a project which contains the App related information and App deployment details of its source environment. Extracting and editing the necessary package file to propagate PowerApps changes to a target Site or List did the trick.
The steps below could be followed to move a SharePoint Custom list PowerApps form one tenant to another.
Steps to move SharePoint Custom List PowerApps Forms across tenants:
Go to your source environment list and click on “Customize forms” as shown below:
Under “Save” Menu click on “See All Versions.”
This redirects you to the version page. If it does not redirect you to version page, then use the URL given below to access the page. Do not forget to replace the portions in italics with your environment specific details.
https://web.powerapps.com/environments/<environment name & ID >/apps/>/versions
Click on ‘Export Package (preview)’ tab as shown below:
Under ‘Export Package,’ click on ‘Configure’ icon as shown below:
Select “Create as new” and Save
Finally, click ‘Export’ and save it on your desktop. Do not forget where you saved the file.
Unzip the exported package from where you saved it. It contains 2 items:
Navigate to folder structure deep down “Microsoft.PowerApps\apps\
Copy and Paste contents of this file into any JSON editor. E.g., https://jsoneditoronline.org/
It's time to update some JSON content here. Replace the highlighted details with target List or Site details as instructed in Red below:
After updating the content, copy and paste it in the same RandomNumber.json file that is mentioned in step-3 and saves it again.
Now zip the below files and folder structure (which has the modified JSON file). Make sure hierarchy remains the same in the zipped file. Remember where you saved the zip file.
Come back to SharePoint and carry out the steps given below:
- In the source environment, save List as a template (*.stp)
- Upload the stp file to target Site (_catalogs/lt/Forms/AllItems.aspx)
- Important: create a List in the target environment with the same internal name as it was in the source. (to make sure we are getting the replica of the List)
- Go to https://web.powerapps.com & Login using the target Tenant credentials.
- Go to Apps section and click on “Import-Package (preview)” as shown in the below image.
Browse and upload your updated package (the newly zipped file):
Upon package upload, it navigates automatically to the screen shown below:
Click on ‘Import.’ It should show you a message as in the image below:
Click on “Open app” link as shown above.
Now if you save the App, you would see it is saving to your target SharePoint site.
One more thing you need to do is delete the existing Data Source and create a new one with the target SharePoint List. Now you will observe the Data Source name is the same as the List name in the target. This avoids giving any errors for data cards on the Forms.
Hope this is helpful. Happy migrating!
Dec 02, 2019
Aug 24, 2018