PowerApps Portals Build Tools – An Azure DevOps Extension to Automate Portal Deployment

toolswv-2
About PowerApps Portals Build Tools

This tool empowers developers to enable CI/CD (Continuous Integration/Continuous Deployment) of portal configuration. You can use this tool to check-in the portal configuration to source control and move the portal configuration to any environment using Power Apps CLI.

For more details about Power Apps CLI support for Power Apps Portal. You can check these articles:

Task Description
Portal Tool Installer This tasks install pre-requisites tools like node.js and npm to connect, authenticate, download, and upload the portal configuration
Export Portal Configuration This task exports the portal configuration from the power platform environment and saves it in the source control.
Import Portal Configuration This task imports the Portal configuration in the power platform environment
Steps to configure
Step 1 – Install the extension in your Azure DevOps Instance
  1. Create a build pipeline in Azure DevOps and find the tool with the name: \”Power Apps Portal Build Tools\”.
  2. Click on \”Get it free\” to get this tool installed in your Azure DevOps instance.

 

Step 2 – Portal Tool Installer

Portal Tool Installer task is used to install all prerequisites software and tools like npm, node.js, etc in Azure DevOps VM. These tools and software are required to connect, authenticate, download, and upload the portal data from/to your Power Platform environment.

 

Step 3 – Export Portal Configuration

Export Portal Configuration task is used to export(download) the portal configuration (form, list, webpages, content snippet, etc) from your Power Platform environment and store it in the source control. In order to use this task in your build pipeline(CI), You need to pass some mandatory information like D365 instance URL, application Id, client secret, tenant id, website id, and the folder path of your source control where you want to save the portal configurations.

Here are the mandatory details that you need to provide:

  • Dynamics 365 URL: https://.crm.dynamics.com
  • Application Id: Register an Azure AD app in azure and capture this value from there
  • Client Secret Key: Register an Azure AD app in azure and capture this value from there
  • Azure Tenant Id: Capture this value from your Azure AD
  • Portal Website id: Capture this value from Dynamics 365 instance, where your portals are installed
  • Save export data: Repository path where you want to store your portal configuration data. For Ex. if you have a folder in the repository with the name Power-Platform-Solution and inside that there is one more folder called PowerApps-Portals, where you want to export the portal configuration, then this parameter value must be: Power-Platform-Solution\\PowerApps-Portals

Step 4 – Commit data to source control

Once you export the portal configuration, it is currently available on your Azure DevOps virtual machine. You need to commit that data to your source control in the Master branch. To do that, you should add a Powershell task and add the following script.

Note: In the git add the command (4th line in the script, as shown below), give the folder path where you want to store the portal configuration in the repository

Step 5 – Import Portal Configuration

Import Portal Configuration task is used to import(upload) the portal configuration (form, list, webpages, content snippet, etc) to your Power Platform environment. In order to use this task in your release(CD) pipeline, You need to pass some mandatory information like D365 instance URL, application Id, client secret, tenant id, and the folder path of your source control where you have exported/stored the portal configurations.

Here are the mandatory details that you need to provide:

  • Dynamics 365 URL: https://.crm.dynamics.com
  • Application Id: Register an Azure AD app in azure and capture this value from there
  • Client Secret Key: Register an Azure AD app in azure and capture this value from there
  • Azure Tenant Id: Capture this value from your Azure AD
  • Portal data: Repository path, where you had stored the portal configuration using Export Portal Configuration task. For Ex: if your portal configuration is stored in \\Power-Platform-Solution\\PowerApps-Portals\\Starter-Portal folder, then you should choose the Starter-Portal folder in the folder path (as shown below)
Demo and Usage

Published by arpitpowerguide

My name is Arpit Shrivastava, who is a Microsoft MVP in the Business Applications category. I am a Microsoft Dynamics 365 and Power Platform enthusiast person who is having a passion for researching and learning new things and acquiring immense knowledge. I am providing consistent help, support, and sharing my knowledge through various Social Media Channels along with my Personal Blog, Microsoft Community, conducting online training and attending various 365 Saturday Events worldwide and sharing the best Solutions to the readers helping them achieve their goals and objectives in Customer Relationship Space.

2 thoughts on “PowerApps Portals Build Tools – An Azure DevOps Extension to Automate Portal Deployment

  1. Hi Arpit,
    Nice extension!
    Is there a way to use deployment profiles in the Import Portal Configuration step? Or can we contribute to your extension?
    Kind regards, Mark

    Liked by 1 person

Leave a comment