0% found this document useful (0 votes)
61 views163 pages

Power Platform Pipelines ALM Guide

The document is a comprehensive guide for setting up Power Platform Pipelines and Application Lifecycle Management (ALM), detailing the creation of managed environments for development, testing, and production. It includes step-by-step instructions for installing Power Platform Pipelines, importing sample solutions, configuring service accounts, and integrating with Azure DevOps. The guide aims to provide practical, easy-to-understand instructions based on best practices in Power Platform ALM.

Uploaded by

Ramcharan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views163 pages

Power Platform Pipelines ALM Guide

The document is a comprehensive guide for setting up Power Platform Pipelines and Application Lifecycle Management (ALM), detailing the creation of managed environments for development, testing, and production. It includes step-by-step instructions for installing Power Platform Pipelines, importing sample solutions, configuring service accounts, and integrating with Azure DevOps. The guide aims to provide practical, easy-to-understand instructions based on best practices in Power Platform ALM.

Uploaded by

Ramcharan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 163

2025

The Complete Power


Platform Pipelines &
ALM Setup Guide
MATTHEW DEVANEY
LAST UPDATED: 2025-02-24
Table Of Contents
Introduction .............................................................................................................................................................. 5

Create Power Platform Managed Environments For Dev-Test-Prod............................................................................. 6


Open The Power Platform Admin Center ........................................................................................................................ 6
Create A New Power Platform Managed Environment ................................................................................................... 7
Configure The Managed Environment For Development ................................................................................................ 8
Setup The Test And Production Managed Environments .............................................................................................. 11

Install Power Platform Pipelines In The Host Environment ........................................................................................ 13


Open The Environments Menu In Power Platform Admin Center ................................................................................ 13
Install The Power Platform Pipelines App ...................................................................................................................... 17
Verify The Model-Driven App Installation In The Host Environment ............................................................................ 20

Import The Sample Solution Into The Dev Environment ............................................................................................ 22


Download The Currency Exchange Sample Solution ..................................................................................................... 22
Import The Solution Into the Development Environment ............................................................................................. 23
Configure The Connection References .......................................................................................................................... 26
Set The Environment Variable Value ............................................................................................................................. 27
Review The Sample Solution In The Development Environment .................................................................................. 30

Setup A Power Platform Service Account ................................................................................................................. 34


Add A New User In The Microsoft 365 Admin Center ................................................................................................... 34
Assign Power Apps And Power Automate Licenses ....................................................................................................... 36
Grant The System Administrator Role ........................................................................................................................... 39

Start A New Azure DevOps Project ........................................................................................................................... 42


Create A New Azure DevOps Organization .................................................................................................................... 42
Setup An Azure DevOps Project ..................................................................................................................................... 46

Configure Development And Target Environments ................................................................................................... 49


Open The Deployment Pipeline Configuration App....................................................................................................... 49
Add The Development Environment To The Pipelines App ........................................................................................... 50
Get The Environment ID From Developer Resources .................................................................................................... 53
Setup The Test Environment As A Target Environment................................................................................................. 55
Configure The Prod Environment As A Target Environment ......................................................................................... 57

Table Of Contents 2
Create A Power Platform Pipeline ............................................................................................................................ 59
Create A New Power Platform Pipeline ......................................................................................................................... 59
Link A Development Environment To The Power Platform Pipeline ............................................................................. 62
Add A Test Environment Deployment Stage To The Pipeline ........................................................................................ 65
Configure A Production Environment Deployment Stage ............................................................................................. 68

Assign Power Platform Pipelines Security Roles ........................................................................................................ 70


Open The Pipelines Model-Driven App .......................................................................................................................... 70
Assign A User To The Deployment Pipeline Administrator Role.................................................................................... 71
Add Users To The Deployment Pipeline Users Role ...................................................................................................... 75

Deploy A Solution To The Test Environment ............................................................................................................. 79


Deploy The Solution To The Test Environment With Pipelines ..................................................................................... 79
Configure Connection References And Environment Variables .................................................................................... 83
Write Deployment Notes To Explain Solution Updates ................................................................................................. 85
Wait For The Test Stage Deployment To Complete ....................................................................................................... 86
Review The Deployment To The Test Environment ....................................................................................................... 88
View The Pipeline Run History ....................................................................................................................................... 90
Get The Managed & Unmanaged Solution ZIP File ........................................................................................................ 92

Deploy A Solution To The Production Environment .................................................................................................. 94


Deploy The Solution To The Production Environment With Pipelines .......................................................................... 94
Set Connection References And Environment Variables ............................................................................................... 96
Give Deployment Notes For Release To Production ...................................................................................................... 98
Wait For The Production Stage Deployment To Complete ............................................................................................ 99
Validate The Deployment To Production ..................................................................................................................... 101
View The Pipeline Run History ..................................................................................................................................... 103

Redeploy A Past Solution Version To A Target Environment.................................................................................... 105


Open The Power Platform Pipelines Run History ........................................................................................................ 105
Redeploy A Solution With Power Platform Pipelines .................................................................................................. 107

Perform A Delegated Deployment Using A Service Account .................................................................................... 109


Create A Power Automate Flow To Approve Delegated Deployments ....................................................................... 109
Auto-Approve A Delegated Deployment In Power Platform Pipelines........................................................................ 111
Enable Delegated Deployment For A Pipeline Deployment Stage .............................................................................. 113
Deploy The Solution As The Service Account............................................................................................................... 116
Review The Delegated Deployment Results ................................................................................................................ 118

Configure Pre-Deployment Stage Approvals ........................................................................................................... 121


Create A Deployment Stage Approver Table ............................................................................................................... 121

Table Of Contents 3
Add Entra ID User & Deployment Stage Lookup Columns ........................................................................................... 125
Setup The Deployment Stage Approver Main Form .................................................................................................... 128
Configure The Test Deployment Stage Approver ........................................................................................................ 130
Assign The Production Deployment Stage Approver ................................................................................................... 135
Create A Power Platform Pipelines Approval Cloud Flow............................................................................................ 140
Get The Deployment Stage Approvers ........................................................................................................................ 142
Obtain The Approvers User Principal Name ................................................................................................................ 144
Send An Deployment Stage Approval To Teams.......................................................................................................... 145
Approve Or Reject The Request For Deployment ........................................................................................................ 146
Deploy The Solution To The Test Deployment Stage ................................................................................................... 148

Setup Dataverse Git Integration For A Solution ...................................................................................................... 151


Initialize A Git Repo In Azure DevOps .......................................................................................................................... 151
Connect The Environment To A Git Repo .................................................................................................................... 153
Select A Solution To Connect To Git ............................................................................................................................ 155
Connect Another Solution To Git ................................................................................................................................. 158

Commit Code Changes To A Git Repository ............................................................................................................ 159


Commit Code Changes To A Git Repository ................................................................................................................. 159
Write A Commit Message For The Solution ................................................................................................................. 161
View The Unpacked Solution In Source Control .......................................................................................................... 162

Table Of Contents 4
Introduction
Welcome to The Complete Power Platform Pipelines ALM Setup Guide.

In this guide you will learn how to setup Power Platform Pipelines and the Dataverse Git Integration. I have spent the
past 5 years teaching Power Platform ALM best-practices and using them in my own projects. Now I want to share the
knowledge I’ve gained in this set of easy-to-understand, practical instructions.

Power Apps Pipelines already have official documentation by Microsoft. So why did I make my own? A few reasons:

• I wanted a guided-tutorial that anyone could understand which includes clear directions and lots of pictures.

• This tutorial can be continuously improved as new Power Apps Pipelines & ALM features hit "general
availability"

• Readers can leave comments on my website describing their own best practices which I can incorporate into
future versions

I hope you enjoy my Power Automate Coding Standards For Cloud Flows.

Support The Site


I don’t have ads on my website because I
believe in delivering the best learning
experience possible. This website is paid
for out of my own pocket. If you’ve found
value in the free resources I’ve created, I’d
love to have your support.

Click on the “Buy Me A Cat Treat” button


below to support the site.

Introduction 5
Create Power Platform Managed
Environments For Dev-Test-Prod
The basic set of Power Platform managed environments required by ALM best practices are a development
environment, a test environment and a production environment. A development environment is where makers create
the solution. The test environment is where quality assurance testers and end-users test the solution. And the
production environment where end-users operate a live version of the solution.

Open The Power Platform Admin Center


Environments are created in the Power Platform Admin Center. Go to admin.powerplatform.com and open the Admin
Center homepage.

Create Power Platform Managed Environments For Dev-Test-Prod 6


Create A New Power Platform Managed Environment
To find the Power Platform environments menu, select Manage, and then choose Environments from the submenu.
Press thew New button to create a new environment.

Create Power Platform Managed Environments For Dev-Test-Prod 7


Configure The Managed Environment For Development
On the New Environment menu select the following setup options:

• Name: choose a name for the environment and use the suffix (DEV). This will let developers know they are in a
development environment

• Make this a Managed Environment: select Yes. To use Power Platform Pipelines the environment must be a
managed environment

• Type: Sandbox for the development environment

Create Power Platform Managed Environments For Dev-Test-Prod 8


Choose a URL for the Dataverse instance. A common pattern for URLs is companyname-purpose-environmentype. In the
example below the environment name is devaney-almtutorial-dev. Press the Save button once finished.

Create Power Platform Managed Environments For Dev-Test-Prod 9


After waiting a few moments for the environment to be created the browser will redirect to the development
environment’s landing page.

Create Power Platform Managed Environments For Dev-Test-Prod 10


Setup The Test And Production Managed Environments
We also require two more environments to be setup for testing and production. Repeat the steps to create a new
environment with these settings:

Test Environment

• Name – Your Environment Name (TEST)

• Make This A Managed Environment – Yes

• Type – Sandbox

• URL – companyname-purpose-test

Production Environment

• Name – Your Environment Name (PROD)

• Make This A Managed Environment – Yes

• Type – Production

• URL – companyname-purpose-prod

Create Power Platform Managed Environments For Dev-Test-Prod 11


Create Power Platform Managed Environments For Dev-Test-Prod 12
Install Power Platform Pipelines In
The Host Environment
The Power Platform Pipelines application allows a user to create and manage pipelines. It must be installed in a host
environment. A host environment is simply a production environment where the pipeline definitions are stored. And
where the pipelines themselves are executed.

Open The Environments Menu In Power Platform Admin Center


To create a host environment for the Power Platform Pipelines application go to the Power Platform Admin Center. Then
open the Environments menu by selecting the option Mange > Environment and press the New button.

Install Power Platform Pipelines In The Host Environment 13


Configure The Power Platform Pipelines Host Environment

In the New Environment menu choose the following setup options:

• Name – PP Pipelines Host

• Make this a managed environment – select Yes.

• Type – select Production

Install Power Platform Pipelines In The Host Environment 14


Then on the Add Dataverse menu choose a URL. A common URL pattern is companyname-pipelines-host. In the example
below, the URL is devaney-pipelines-host. Press the Save button once setup is finished.

Install Power Platform Pipelines In The Host Environment 15


After a few moments, the web browser redirects to the landing page for the Power Platform Pipelines host
environment.

Install Power Platform Pipelines In The Host Environment 16


Install The Power Platform Pipelines App
Now that the host environment is setup the Power Platform Pipelines application must be installed. In the Power
Platform Admin Center go to Manage > Dynamics 365 Apps. Choose Power Platform Pipelines and select Install.

Install Power Platform Pipelines In The Host Environment 17


Choose the Power Platform Pipelines host environment and press the Install button.

Install Power Platform Pipelines In The Host Environment 18


The app installation process begins.

Install Power Platform Pipelines In The Host Environment 19


Verify The Model-Driven App Installation In The Host Environment
After a few minutes the Power Platform Pipelines installation will complete.

Install Power Platform Pipelines In The Host Environment 20


Go to the Power Platform Pipelines Host environment and look for a model-driven app named Deployment Pipelines
Configuration. This is the application used to create and manage pipelines.

Install Power Platform Pipelines In The Host Environment 21


Import The Sample Solution Into
The Dev Environment
This Power Platform Pipelines tutorial uses a sample solution with a canvas app, a model driven app, a flow, connections
references, environment variables and tables. Rather than build them from scratch, we will import them into the
development environment. That way we can keep focused on learning Power Platform application lifecycle
management.

Download The Currency Exchange Sample Solution


The Currency Exchange sample solution is available for free in this Github repostiory. Download the file to your local
machine.

Import The Sample Solution Into The Dev Environment 22


Import The Solution Into the Development Environment
Open the Development environment in Power Apps and go to the Solutions menu. Press the Import solution button.

Import The Sample Solution Into The Dev Environment 23


Select the Currency Exchange sample solution from your local machine and press Next.

Import The Sample Solution Into The Dev Environment 24


Review the import details and press the Next button again.

Import The Sample Solution Into The Dev Environment 25


Configure The Connection References
The sample solution contains two connection references used in a Power Automate flow. One for Dataverse and another
for Outlook. Wait for the green checkmark to appear beside each connection reference. If it does not appear, press the
three dots to troubleshoot the issue. Then press the Next button.

Import The Sample Solution Into The Dev Environment 26


Set The Environment Variable Value
The sample solution also contains an environment variable for Email Notifications. The email address in this
environment variable will receive email. Set this value to your personal email then press Import.

Import The Sample Solution Into The Dev Environment 27


The sample solution will begin importing.

Import The Sample Solution Into The Dev Environment 28


After a few minutes the import process will complete.

Import The Sample Solution Into The Dev Environment 29


Review The Sample Solution In The Development Environment
Open up the sample solution in the development environment and get to know its components.

Import The Sample Solution Into The Dev Environment 30


Note that the environment variable is set to the value we defined during the import process.

Import The Sample Solution Into The Dev Environment 31


And the connection references for Dataverse and Outlook have been configured with a connection.

Import The Sample Solution Into The Dev Environment 32


To see the connections used in the connection references go to the Connections menu.

Import The Sample Solution Into The Dev Environment 33


Setup A Power Platform Service
Account
A Power Platform Service Account is a Microsoft 365 account used by the system to perform background operations.
Service Accounts often have an elevated security role like System Administrator. By using a Service Account, Power
Platform Pipelines can deploy solutions as the service account instead of the user who started the deployment. This
avoids giving the user system administrator privileges to the target environment

Add A New User In The Microsoft 365 Admin Center


To create a Power Platform Service Account go to the Microsoft 365 Admin Center. Then browse to Users > Active Users
and press the Add A User button.

Setup A Power Platform Service Account 34


Set the first name and last name to Service Account. And choose a username such
as [email protected]. Then press the Next button.

Setup A Power Platform Service Account 35


Assign Power Apps And Power Automate Licenses
The Power Platform Service Account must have premium licenses assigned to it. Apply a Power Apps Premium license
and a Power Automate license. Then press Next.

Setup A Power Platform Service Account 36


On the final screen, review the setup details. Then press the Finish button.

Setup A Power Platform Service Account 37


The Power Platform Service Account now appears in the list of Users.

Setup A Power Platform Service Account 38


Grant The System Administrator Role
The Power Platform Service Account must be given a System Administrator role in all environments: Development, Test,
Production and the Pipelines Host environment. For each environment, go-to the landing page and open the Users
menu.

Setup A Power Platform Service Account 39


Add the Power Platform Service Account as a new user.

Setup A Power Platform Service Account 40


Assign the System Administrator role to the Service Account.

Setup A Power Platform Service Account 41


Start A New Azure DevOps Project
An Azure DevOps project must be setup to take advantage of Power Platform Git Integration. Then we can add an Azure
Repo to the DevOps project to store code in Git. An Azure DevOps license is free for the first 5 users in an organization
and only takes a few minutes to setup.

Create A New Azure DevOps Organization


Azure DevOps can be accessed through the Azure Portal. Open the Azure Portal and search for Azure DevOps
organizations.

Start A New Azure DevOps Project 42


An Azure DevOps organization is needed to create Azure DevOps projects. Press the My Azure Dev Ops Organizations
page.

Start A New Azure DevOps Project 43


Press the Create new organization button or select an existing organization.

Start A New Azure DevOps Project 44


If starting a new organization, select a URL and a host country. Then press Continue.

Start A New Azure DevOps Project 45


Setup An Azure DevOps Project
On the Azure DevOps home page, select your organization once again, and fill-in the create a project menu. Choose the
name ALM Tutorial Project. Set visibility to Private and version control to Git. Then press the Create project button.

Start A New Azure DevOps Project 46


The new project will appear inside the selected organization. Open the project.

Start A New Azure DevOps Project 47


The project landing screen appears with a welcome message.

Start A New Azure DevOps Project 48


Configure Development And Target
Environments
Power Platform Pipelines must be connected to a development environment and one or more target environments. A
development environment is where makers develop solutions. Target environments are where solutions get deployed
to. For example, the test and production environments. Before creating the pipeline we will add environments to the
pipeline configuration app.

Open The Deployment Pipeline Configuration App


Go to the Power Platform Pipelines host environment and open the Deployment Pipelines Configuration app.

Configure Development And Target Environments 49


Add The Development Environment To The Pipelines App
First, we will add a development environment. Go to the Environments page and press the New button.

Configure Development And Target Environments 50


Fill-in the environment details then press the save button. The validation status will switch to pending.

• Name – ALM Tutorial (Dev)

• Owner – set to your own user account

• Environment Type – Development Environment

• Environment ID – the environment ID from the environment’s developer resources menu.

Configure Development And Target Environments 51


After a few moments pass press the refresh button. The validation status will be updated to success.

Configure Development And Target Environments 52


Get The Environment ID From Developer Resources
The environment id is necessary to setup the developer and target environments in Power Platform Pipelines. Go to any
environment, press the settings button and select developer resources.

Configure Development And Target Environments 53


The unique identifier of the environment is shown as Environment ID.

Configure Development And Target Environments 54


Setup The Test Environment As A Target Environment
Continue on with adding the Test Environment as a target environment. Target environments are environments where
managed solutions are deployed to.

Configure Development And Target Environments 55


Add the environment details then press the save button. Wait for the environment to pass validation.

• Name – ALM Tutorial (Test)

• Owner – set to your own user account

• Environment Type – Target Environment

• Environment ID – the environment ID from the environment’s developer resources menu.

Configure Development And Target Environments 56


Configure The Prod Environment As A Target Environment
Add a new environment one more time. Supply the environment details then press the save button. Wait for the
environment to pass validation.

• Name – ALM Tutorial (Prod)

• Owner – set to your own user account

• Environment Type – Target Environment

• Environment ID – the environment ID from the environment’s developer resources menu.

Configure Development And Target Environments 57


All environments have now been added to the Deployment Pipeline Configuration app. The Developer environment is
included as development environment. And the Test & Production environments are target environments.

Configure Development And Target Environments 58


Create A Power Platform Pipeline
Power Platform Pipelines move solutions from a development environment to a target environment such as the test
environment or the production environment. They ensure deployments to the correct environment are performed in a
consistent manner. Configuration of components such as connection references and environment variables can be
controlled through deployment settings. And a copy of the solution is stored for easy redeployment if needed.

Create A New Power Platform Pipeline


Go to the pipelines host environment and open the deployment pipeline configuration model-driven app.

Create A Power Platform Pipeline 59


Browse to the pipelines page and create a new pipeline.

Create A Power Platform Pipeline 60


Name the pipeline ALM Tutorial Pipeline. Allow redeployments of older versions. Then save the pipeline.

Create A Power Platform Pipeline 61


Link A Development Environment To The Power Platform Pipeline
We want the pipeline to export solutions form the development environment and import them into the test and
production environments. Add an existing development environment to the pipeline.

Create A Power Platform Pipeline 62


Select the ALM Tutorial (Dev) development environment to the pipeline. We created this record in a previous module of
the tutorial.

Create A Power Platform Pipeline 63


The ALM Tutorial (Dev) environment now appears in the linked development environments subgrid.

Create A Power Platform Pipeline 64


Add A Test Environment Deployment Stage To The Pipeline
The test environment is the first target environment we will add to the Power Platform pipeline. Look for the
deployment stages subgrid and press the new deployment stage button.

Create A Power Platform Pipeline 65


Setup the test environment deployment stage as follows. Then save and close the stage.

• Name – ALM Tutorial Deployment Stage (Test)

• Owner – your Microsoft 365 account

• Deployment Pipeline – ALM Tutorial Pipeline

• Target Deployment Environment ID – ALM Tutorial (Test)

Create A Power Platform Pipeline 66


The test environment deployment stage appears in the subgrid.

Create A Power Platform Pipeline 67


Configure A Production Environment Deployment Stage
The final deployment stage of the pipeline is the production environment. Add another new deployment stage to the
pipeline with the following details. Then save and close the stage.

• Name – ALM Tutorial Deployment Stage (Prod)

• Owner – your Microsoft 365 account

• Deployment Pipeline – ALM Tutorial Pipeline

• Previous Deployment Stage – ALM Tutorial (Test)

• Target Deployment Environment ID – ALM Tutorial (Prod)

Create A Power Platform Pipeline 68


The production environment appears in the deployment stages subgrid.

Create A Power Platform Pipeline 69


Assign Power Platform Pipelines
Security Roles
A Power Platform Pipelines security role is required to create or use Power Platform pipelines if you are not the system
administrator. We can assign a user to the deployment pipeline administrators role or the deployment pipeline users
role indirectly through security teams. Security teams are found in the pipelines model-driven app.

Open The Pipelines Model-Driven App


Go to the pipelines host environment and open the deployment pipeline configuration model-driven app.

Assign Power Platform Pipelines Security Roles 70


Assign A User To The Deployment Pipeline Administrator Role
The deployment pipeline administrator role gives users access the to deployment pipeline configuration app and the
ability to create & edit pipelines in the host environment. To assign a new pipelines administrator, open the security
teams page and select deployment pipeline administrators.

Assign Power Platform Pipelines Security Roles 71


Press the add existing user button in the Team members subgrid.

Assign Power Platform Pipelines Security Roles 72


Choose the user you want to become a Power Platform pipelines administrator. Then press the Add button.

Assign Power Platform Pipelines Security Roles 73


The user appears in the team members subgrid.

Assign Power Platform Pipelines Security Roles 74


Add Users To The Deployment Pipeline Users Role
The deployment pipeline user role gives the user an ability to run a pipeline that is shared with them. To add a new
pipelines user, go to the security teams page and select deployment pipeline users

Assign Power Platform Pipelines Security Roles 75


Look for the team members subgrid and press the add existing user button.

Assign Power Platform Pipelines Security Roles 76


Choose one or more users to become Power Platform pipeline users. The press the add button.

Assign Power Platform Pipelines Security Roles 77


The Power Platform pipelines users now show up in the team members subgrid.

Assign Power Platform Pipelines Security Roles 78


Deploy A Solution To The Test
Environment
After creating a Power Platform Pipeline, we can use it to import a solution from the development environment into the
test environment, before pushing it to production. The test environment allows us to perform quality tests on the
solution and validate the deployment while not blocking development. It is recommended to check solutions into git-
based source control before moving them into test.

Deploy The Solution To The Test Environment With Pipelines


Go to the development environment and open the solution you want to move to the test environment.

Deploy A Solution To The Test Environment 79


Select the pipelines menu item from the left navigation.

Deploy A Solution To The Test Environment 80


On the Pipelines page, select the ALM Tutorial Pipeline. Then press the Deploy here button.

Deploy A Solution To The Test Environment 81


Choose to deploy the solution now, then press the Next button.

Deploy A Solution To The Test Environment 82


Configure Connection References And Environment Variables
The sample solution contains two connection references used in a Power Automate flow. One for Dataverse and another
for Outlook. Wait for the green checkmark to appear beside each connection reference. If it does not appear, press the
three dots to troubleshoot the issue. Then press the Next button.

Deploy A Solution To The Test Environment 83


The sample solution also contains an environment variable for Email Notifications. The email address in this
environment variable will receive email. Set this value to the tester’s email address then press Next.

Deploy A Solution To The Test Environment 84


Write Deployment Notes To Explain Solution Updates
Each deployment will update a the solution in the target environment. To make it easier to track changes it is important
to write good deployment notes. Explain the difference between each deployment as opposed to giving an overview of
the entire solution. Do not use AI generated deployment notes.

Press the deploy button once finished.

Deploy A Solution To The Test Environment 85


Wait For The Test Stage Deployment To Complete
Power Platform Pipelines will begin to the deploy the solution to the test environment. This operation takes a few
minutes to complete.

Deploy A Solution To The Test Environment 86


When the deployment successfully completes the last installed version and the deployment date appear in the test
stage.

Deploy A Solution To The Test Environment 87


Review The Deployment To The Test Environment
Go to the test environment and open the solutions menu to check on the deployment of the sample solution. Look
under the managed solutions tab.

Deploy A Solution To The Test Environment 88


It is recommended to verify the deployment by opening applications and automations to ensure they are working in the
new environment.

Deploy A Solution To The Test Environment 89


View The Pipeline Run History
To look at the run history of the Power Platform Pipeline, go to the host environment and open the Deployment Pipeline
Configuration app. Then go to the run history page and select a run.

Deploy A Solution To The Test Environment 90


The run details page looks like this.

Deploy A Solution To The Test Environment 91


Get The Managed & Unmanaged Solution ZIP File
During manual exports we download a solution zip file to our machine then import it into the test environment. This
gives us a valuable copy of the solution zip file which we can use in redeployments. The Power Platform Pipeline also
stores the solution zip files as solution artifacts. Go to the solution artifacts page and open an artifact.

Deploy A Solution To The Test Environment 92


The managed and unmanaged solution zip files are found on the solution artifact details page.

Deploy A Solution To The Test Environment 93


Deploy A Solution To The
Production Environment
Once testing is completed we can use Power Platform Pipelines to move the managed solution to the production
environment and go-live. Using a pipeline ensures the deployment to production is performed in a consistent manner.
And it forces all changes to pass through the test environment first.

Deploy The Solution To The Production Environment With Pipelines


Go to the development environment and open the solution you want to move to the production environment.

Deploy A Solution To The Production Environment 94


Schedule the deployment now and press the Next button.

Deploy A Solution To The Production Environment 95


Set Connection References And Environment Variables
The sample solution contains two connection references used in a Power Automate flow. One for Dataverse and another
for Outlook. Wait for the green checkmark to appear beside each connection reference. If it does not appear, press the
three dots to troubleshoot the issue. Then press the Next button.

Deploy A Solution To The Production Environment 96


The sample solution also contains an environment variable for Email Notifications. The email address in this
environment variable will receive email. Set this value to the production email address then press Next.

Deploy A Solution To The Production Environment 97


Give Deployment Notes For Release To Production
Similar to the deployment to the test environment, we want to write an update explaining the changes to production.
Highlight the differences between the solution we are about to deploy and the current version in production. This helps
us to track changes when troubleshooting issues with a past deployment. Do not use AI generated deployment notes.

Press the deploy button once finished.

Deploy A Solution To The Production Environment 98


Wait For The Production Stage Deployment To Complete
Power Platform Pipelines needs a few minutes to import the solution into the Production environment.

Once the solution import is completed the last successfully installed version and last deployed date will appear in the
production stage card.

Deploy A Solution To The Production Environment 99


Deploy A Solution To The Production Environment 100
Validate The Deployment To Production
After a deployment it is important to make sure the solution is working in the target environment. Go to the production
environment, browse to the solutions menu, select the Managed tab and open the sample solution.

Deploy A Solution To The Production Environment 101


Go through each of the solution components and give them a brief test.

Deploy A Solution To The Production Environment 102


View The Pipeline Run History
To look at the run history of the Power Platform Pipeline, go to the host environment and open the Deployment Pipeline
Configuration app. Then go to the run history page and select the latest run.

Deploy A Solution To The Production Environment 103


The run details page looks like this.

Deploy A Solution To The Production Environment 104


Redeploy A Past Solution Version To
A Target Environment
Do you need to roll-back a solution version? This is possible using the Power Platform Pipelines redeploy feature. It
allows you to pick a solution and downgrade to an earlier version. Be careful though, if you are removing Dataverse
tables or columns then the data in stored them will be lost.

Open The Power Platform Pipelines Run History


In the development environment, go to the solution you want to rollback and open the Pipelines menu.

Redeploy A Past Solution Version To A Target Environment 105


Select the run history tab.

Redeploy A Past Solution Version To A Target Environment 106


Redeploy A Solution With Power Platform Pipelines
The run history shows all past deployments to a target environment. To redeploy a past solution version, select the
three dots beside it and press choose the redeploy option.

Redeploy A Past Solution Version To A Target Environment 107


A redeployment will overwrite the current solution in the target environment. If that solution has a different set of
Dataverse tables and columns it could result in data loss. Before you redeploy, take a moment to determine the
differences between solutions and understand what will be deleted.

Redeploy A Past Solution Version To A Target Environment 108


Perform A Delegated Deployment
Using A Service Account
A delegated deployment in Power Platform Pipelines is performed by the service account rather than the user who
pressed the deploy button. This is useful because we can grant the service account elevated permissions to the target
environment while the user is prevented from making any direct changes inside of the environment. It forces them to
use pipelines for deployment, which is a good thing. And if the service account performs the initial deployment of a
solution the apps and flows within it will be owned by the service account in the new environment.

Create A Power Automate Flow To Approve Delegated Deployments


Power Platform Pipelines delegated deployments require an approval. Currently, thee only way to perform this approval
is by using a Power Automate flow.

Go to the Pipelines Host environment and create a new solution named Pipelines Extensions.

Perform A Delegated Deployment Using A Service Account 109


Then create a new Power Automate flow with an automated trigger inside of the Pipelines Extensions solution.

Perform A Delegated Deployment Using A Service Account 110


Name the solution Approve Pipelines Deployment and select the when an action is performed Dataverse trigger.

Auto-Approve A Delegated Deployment In Power Platform Pipelines


Delegated deployments require an approval but we want the approval to be automatic. Set the flow trigger category to
Power Platform Pipelines and use the action name OnApprovalStarted. Then add a condition where true=true so it will
always evaluate to yes. Inside of the yes condition, perform an unbound action with the following parameters:

• Action Name – UpdateApprovalStatus

• Approval Properties – workflow()

• StageRunId – Action Inputs StageRunId

• Approval Status – 20 (approved)

Also, in the no condition perform the same unbound action with an Approval Status of 30 (rejected). Although it is not
necessary in this scenario we have setup the no condition to understand how do it.

Perform A Delegated Deployment Using A Service Account 111


Perform A Delegated Deployment Using A Service Account 112
Enable Delegated Deployment For A Pipeline Deployment Stage
A delegated deployment can be setup from the deployment stage record in the deployment pipeline configuration app.
Launch the app and go to the Pipelines page. Select the ALM Tutorial Pipeline and locate the deployment stages subgrid.

Perform A Delegated Deployment Using A Service Account 113


Open the test deployment stage and check Is Delegated Deployment. Choose the Delegated Deployment Type Stage
Owner and set the Owner to the Service Account. Save and close the record.

Perform A Delegated Deployment Using A Service Account 114


Do the same for the production deployment stage.

Perform A Delegated Deployment Using A Service Account 115


Deploy The Solution As The Service Account
The test and production deployment stages are now setup to perform delegated deployments. All future Power
Platform Pipeline runs will be performed by the service account.

Go to the Pipelines menu for the sample solution and press the deploy here button to deploy the solution to the test
environment.

Perform A Delegated Deployment Using A Service Account 116


Work through the deploying solution wizard and then press the deploy button on the final page.

Perform A Delegated Deployment Using A Service Account 117


Review The Delegated Deployment Results
Wait for the Power Platform Pipeline to complete the solution deployment.

Perform A Delegated Deployment Using A Service Account 118


Once completed, the deployment stage will show the new version number and last deployed date. Then go to the test
environment to review the solution and ensure it deployed correctly.

Perform A Delegated Deployment Using A Service Account 119


Look at the latest run in the Approve Pipelines Deployment flow run history. It shows the auto-approval to the test
deployment stage.

Perform A Delegated Deployment Using A Service Account 120


Configure Pre-Deployment Stage
Approvals
Power Platform pipelines can be enhanced to include deployment stage approvals. Although there are no-built-in
pipeline approvals it is possible to create one using an custom Dataverse table and a Power Automate flow. Stage
approvals are important because they help the environment owner control what gets deployed into their environment.
An approvals process should be a part of any Power Platform Pipelines process.

Create A Deployment Stage Approver Table


We want to allow a Power Platform pipelines administrator to add approvers to a deployment stage. To do this we will
create a new Dataverse table. Go to the Pipelines Host environment and open the solutions menu.

Configure Pre-Deployment Stage Approvals 121


Inside of a solution, add a new Dataverse table.

Configure Pre-Deployment Stage Approvals 122


Name the table Deployment Stage Approver and press the Save button.

Configure Pre-Deployment Stage Approvals 123


Power Apps will redirect us to the Deployment Stage Approver table landing page.

Configure Pre-Deployment Stage Approvals 124


Add Entra ID User & Deployment Stage Lookup Columns
A Power Platform pipelines administrator will configure approvals by adding a user and a deployment stage as a new
record in the Deployment Stage Approvers table. Go to the columns page and select New column.

Configure Pre-Deployment Stage Approvals 125


Name the column Entra ID user and select the data type Lookup. Make the field required. And choose the Microsoft
Entra ID table. Then press the Save button.

Configure Pre-Deployment Stage Approvals 126


Create a second column named Deployment Stage as a Lookup data type. Make it a required field and set the related
table to Deployment Stage. Press the Save button once finished.

Configure Pre-Deployment Stage Approvals 127


Setup The Deployment Stage Approver Main Form
We want the Power Platform pipelines approval to be configurable within the Deployment Pipelines Configuration app.
Therefore we will need to setup a the table's main form. Switch to the Deployment Stage Approver table's Forms page
and open the main form.

Configure Pre-Deployment Stage Approvals 128


Add the Deployment Stage field and the Entra ID User field to the form. Save and publish the form then exit.

Configure Pre-Deployment Stage Approvals 129


Configure The Test Deployment Stage Approver
We are now ready to configure the approver for a Power Platform pipelines deployment stage. Open the Deployment
Pipeline Configuration app and browse to the Pipelines page. Select the test deployment stage record.

Configure Pre-Deployment Stage Approvals 130


On the deployment stage form, check the pre-deployment step required checkbox.

Configure Pre-Deployment Stage Approvals 131


Then go to the related tab and select Deployment Stage Approvers.

Configure Pre-Deployment Stage Approvals 132


Press the New Deployment Stage Approvers button.

Configure Pre-Deployment Stage Approvals 133


Fill-in the Deployment Stage Approver form with the Test Deployment Stage and the Entra ID User who will be the
approver.

Configure Pre-Deployment Stage Approvals 134


Assign The Production Deployment Stage Approver
The deployment to the production stage will also require an approver. Select the production deployment stage record.

Configure Pre-Deployment Stage Approvals 135


Then on the main form check the pre-deployment stage required checkbox.

Configure Pre-Deployment Stage Approvals 136


Next, open the related tab and choose Deployment Stage Approvers from the dropdown menu.

Configure Pre-Deployment Stage Approvals 137


Press the New Deployment Stage Approver button.

Configure Pre-Deployment Stage Approvals 138


Assign the approver to the Entra ID User field and select the production deployment stage.

Configure Pre-Deployment Stage Approvals 139


Create A Power Platform Pipelines Approval Cloud Flow
We will use Power Automate approvals to provide an interface for stage owners to approve and reject deployments. In
the solution, create a new automated cloud flow with the name Approve Pipelines Deployment. Select the Dataverse
trigger when an action is performed.

Configure Pre-Deployment Stage Approvals 140


Set the flow trigger category to Power Platform Pipelines and use the action name OnApprovalStarted

Configure Pre-Deployment Stage Approvals 141


Get The Deployment Stage Approvers
After the cloud flow is triggered we want to get the list of deployment stage approvers so we can send them an approval
request. Determining the approvers requires multiple flow actions.

Start by adding a Dataverse - Get A Row By ID Action and target the Deployment Stage Runs table. Use the StageRunId
from the trigger as the Row ID. Then insert another Dataverse - Get A Row By ID action with the Deployment Stages
table. Supply the deployment stage id from the previous action in the Row ID field.

Configure Pre-Deployment Stage Approvals 142


There could be multiple deployment stage approvers so the next step requires a Dataverse - List Rows action.

Write this code in the Filter Rows field to get all approvers with a matching deployment stage.

_new_deploymentstage_value eq @{outputs('Get_a_row_by_ID:_Deployment_Stage')?['body/deploymentstageid']}

Configure Pre-Deployment Stage Approvals 143


Obtain The Approvers User Principal Name
Now we have an array of deployment stage approvers. But what we really need is a semi-colon separated list of user
principal names (emails) to use in an Approvals flow action.

Initialize a string variable named varStageApprovers. Then for each deployment stage approver,use the Office 365 Users
- Get User Profile (V2) action and supply the Entra User ID to retrieve the user principal name. Append each user
principal name to the string variable with a semi-colon at the end.

Configure Pre-Deployment Stage Approvals 144


Send An Deployment Stage Approval To Teams
We have everything we need to send an approval request to the deployment stage approvers. Add an Approvals - Start
and wait for an approval action with the following values:

• Approval type - Approve/Reject - First to respond

• Title: Deployment Approval Request

• Assigned to: varStageApprovers

• Details: Please approve deployment of the <Artifact Name> solution to the <Deployment Stage Name> stage.

Configure Pre-Deployment Stage Approvals 145


Approve Or Reject The Request For Deployment
After the approvals action, insert a condition action to check the outcome of the approval. If yes, perform an unbound
action to approve deployment. Fill-in the action with the following values:

• Action Name - UpdateApprovalStatus

• Approval Properties - workflow()

• StageRunId - Action Inputs StageRunId

• Approval Status - 20 (approved)

In the no condition perform the same unbound action with an Approval Status of 30 (rejected).

Configure Pre-Deployment Stage Approvals 146


Configure Pre-Deployment Stage Approvals 147
Deploy The Solution To The Test Deployment Stage
All that is left now is to run the pipeline make the sure the approvals we setup are working. Navigate to the sample
solution in the development environment and open the pipelines menu. Press the deploy here button on the test stage.

Configure Pre-Deployment Stage Approvals 148


Behind the scenes the Power Automate flow is triggered and sends an approval request to the deployment stage
approver.

Configure Pre-Deployment Stage Approvals 149


Once the approver presses the Approve button the pipeline continues with deployment.

Configure Pre-Deployment Stage Approvals 150


Setup Dataverse Git Integration For
A Solution
A Power Platform solution can be connected to a Git repo for tracking and management of changes to code. This is
known as source control. To do this, a Git repo must be setup inside an Azure DevOps project. Then you can choose
whether to connect individual solutions or the entire environment to source control

Initialize A Git Repo In Azure DevOps


Go to Azure DevOps and open a project where you want the repo to be located. Then go to the Repos page and Initialize
a new main branch with a readme.

Setup Dataverse Git Integration For A Solution 151


The main branch of the repo will appear with a readme file inside of it.

Setup Dataverse Git Integration For A Solution 152


Connect The Environment To A Git Repo
We want to connect the development environment to our git repo. Go to the development environment and open the
Solutions page. Select Connect to Git from the top-menu bar.

Setup Dataverse Git Integration For A Solution 153


Fill-in the Connect to Git menu with the following values the press the Next button.

• Connection Type – Solution

• Organization – the Azure DevOps organization where your repo is located

• Project – the Azure DevOps project where your repo is located

• Repository – the name of the repository

• Root Git Folder – “src” (which means source)

Setup Dataverse Git Integration For A Solution 154


Select A Solution To Connect To Git
On the next screen we must select a solution to connect to git and select a branch and folder. Use the following values
and press the Connect button.

• Solution – YourSolutionName

• Branch – main

• Git folder – src/YourSolutionName

Setup Dataverse Git Integration For A Solution 155


After a few moments the solution will become connected to Git.

Setup Dataverse Git Integration For A Solution 156


And the solution folder will appear in the repo. The folder will only include a readme file until we commit changes made
to the solution.

Setup Dataverse Git Integration For A Solution 157


Connect Another Solution To Git
Our Dataverse Git integration was setup with the connection type Solution. This means we must connect individual
solutions one-by-one. To connect another solution, open the solution and go to the source control page. Then press the
Connect to Git button and go through the wizard steps once again.

Setup Dataverse Git Integration For A Solution 158


Commit Code Changes To A Git
Repository
The Dataverse Git Integration can be used to commit changes to a git repository. A git commit takes a snapshot of the
project in its current state and saves it into the repo. It includes a message from the developer explaining the updates
made in the commit. This makes it possible to revert back to that version if needed later on.

Commit Code Changes To A Git Repository


A git commit takes a snapshot of the project in its current state and saves it into source control. We want to use a git
commit to perform the initial save of the solution to the repo. Open the solution we will save to the repo.

Commit Code Changes To A Git Repository 159


Then open the source control menu for the solution. There will be a list of changes to be made to the current branch.
When ready, press the commit button to create a save point.

Commit Code Changes To A Git Repository 160


Write A Commit Message For The Solution
All git commits must have a comment. They will help us to understand what changes were made for a specific commit
when we need to know in the future. For the first git commit write the message initial commit. Then press the commit
button.

Commit Code Changes To A Git Repository 161


View The Unpacked Solution In Source Control
Wait a few minutes for the git commit to complete and the Commit Successful banner to appear.

Commit Code Changes To A Git Repository 162


Once the git commit is completed we can see the unpacked solution in source control. Browse the unpacked solution to
learn more about each components structure.

Commit Code Changes To A Git Repository 163

You might also like