Moving portal records between environments
Prerequisites
1. Install Power Platform CLI. Current valid link: https://aka.ms/PowerAppsCLI
2. Access to Power Apps Admin Centre
New Portal
Provision a new Portal in target environment using the requisite Portal Template (you can use an existing template like Customer Self-Service)
Once the Portal has been provisioned, move to the Portal Management app and delete the newly created website record. This will remove the default portal configuration data from target environment.
Delete the Portal app in Power Platform (make.powerapps.com)
CLI to export and import portals
Use following commands in the Powershell. You will be asked to login (if you have not already) into the environment when executing the command.
1.
pac auth create --name [name] --url [environment url]
[name] could be any name for us to recognise the connection
2.
pac auth list
3.
pac auth select --index [source environment index]
[Source environment index] is the index in screenshot above.
4
pac paportal list
Get list of portals in the environment
5
pac paportal download --path [path] --webSiteId [website id]
Use this command to download the portal into local computer
6
pac auth select --index [Target environment index]
Select target environment (same command as step 3, but for the target environment)
7
pac paportal upload --path [path]
[path] Choose the file path where the portal was downloaded on the local computer.
8
If this is a new portal, update the binding website record in the Power Platform Admin Centre.
Note
During exports/ imports you can refer to the following folder to access the log files:
%localappdata%\Microsoft\PowerAppsCLI
Navigate further to the latest Microsoft.PowerAppsCLI folder \tools\logs
Reference
Migrate portal configuration - Power Apps | Microsoft Docs