Power Platform CLI | Power Apps Portal | Version Control

PowerPortals Version Control
PowerPortals Version Control

To use the Power Platform CLI, you can follow these steps:

Installation:

  • Launch Visual Studio Code.
  • Click on the Extensions icon located in the Activity panel. Then, enter "Power Platform Tools" in the search bar.
  • Choose to install the extension. After the installation is complete, restart Visual Studio Code to access the extension within the Terminal window.

Power Platform Tools

  • After the installation is complete, restart Visual Studio Code to access the extension within the Terminal window.
  • To verify everything is working, open the terminal window and enter pac.

PAC Version Screen

Authentication:

  • Open a new ‘Terminal’.

  • Authenticate to the Dataverse environment using the following command:

    pac auth create -u {Environment_url}

PAC CLI Authentication

  • Run the command pac paportal list to view the list of available Portals.

PAC Portal List

  • Copy the ‘WebSiteId’ as highlighted above.

  • Now download the website components using following command.

    pac paportal download –p [PATH] -id [WebSiteId]

    PAC CLI Portal Download

This is how the website contents are saved locally once downloaded.

Folder

Version Control:

You can commit the website components to a version control tool such as Azure DevOps or GitHub after downloading the portal website content. This allows you to leverage Power Platform CLI and Power Portals for version control and change management of your portal website components.

Change Website Content:

• Use Visual Studio Code to modify the configuration and save the modifications. Ensure you update only the supported tables for use with Power Platform CLI. For more information, see Supported tables.

Upload the changes:

• To upload the changes you made, use the pac paportal upload command with the folder location:

pac paportal upload --path [Folder-location]

• For multiple environment uploads, check out Upload the changes using the deployment profile to find out how to use the deployment profile for uploading changes.



Back to Blog

Copyright 2023. All Rights Reserved