March 3, 2026

Power Platform CI/CD Using Azure DevOps: Complete Step-by-Step Guide

Introduction

When working with multiple environments (Development, UAT, Production), manually moving Power Platform solutions can slow down your delivery cycle. With Azure DevOps and Microsoft's Power Platform Build Tools, we can automate:

  • Exporting the solution from the source
  • Storing and unpacking it in a repository
  • Packing and importing it into the target environment

Step 1: Azure App Registration

Go to Azure Portal and open App registrations.

Click on New registration and name your app (e.g., Pipelines CICD Deployment Power Apps).

After registration:

Save the Application (client) ID

Save the Directory (tenant) ID

Navigate to API permissions and add:

  • Azure DevOps → user_impersonation
  • Dynamics CRM → user_impersonation
  • PowerApps Runtime → user_impersonation

Go to Certificates & Secrets → New client secret and store it securely.

Azure App Registration screenshot

Step 2: Power Platform Setup

Create Your Solution and Components (Source Environment)

Start by logging into make.powerapps.com and select your source environment (e.g., "Dev" or "Default").

Click on Solutions → New solution.

Give it a name (e.g., Client Feedback Solution) and select a publisher.

After creating the solution, add your components — for example:

A Dataverse table (e.g., Client Feedback)

A Canvas app that connects to this table and allows users to submit feedback.

Once created, be sure to save and publish your solution.

Power Apps Solution screenshot
Grant Deployment Access: Configure Application Users

To enable Azure DevOps to interact with Power Platform environments, you must authorize your registered Azure App by creating Application Users with the right permissions.

Here's how to do it:

Go to the Power Platform Admin Centre.

In the left menu, click on Environments, then choose your source environment.

Click on Settings → Users + permissions → Application users.

Application Users settings screenshot

Click + New app user and follow these steps:

Select the app: Choose the Azure AD app you registered in Step 1.

Business Unit: Choose the root business unit.

Security Role: Assign the System Administrator role (this is required for full deployment access).

And then click "Save"

After that just open the app user that you just added and click on the refresh button (having tooltip as: "Update application name from Microsoft Entra ID")

Repeat the same steps for your target environment (e.g., "Test" or "Production").

New app user configuration screenshot

This setup ensures your DevOps pipeline can export and import solutions securely across environments.


Step 3: DevOps Project Configuration

Go to Azure DevOps and create a new private project.

Azure DevOps new project screenshot

Install the Microsoft Power Platform Build Tools from the Azure Marketplace

Power Platform Build Tools marketplace screenshot

Create Service Connections for both Source and Target environments using:

  • Client ID
  • Tenant ID
  • Client Secret
  • Environment URLs
Service connections page screenshot

Go to Project Settings (bottom-left gear icon) → Service connections → Click "Create service connection".

Search Power Platform service connection screenshot

Search for "Power Platform", select it, and click Next.

Source Connection configuration screenshot

Fill in the Source Connection details: select "Application Id and client secret" as the authentication method, enter the Source environment URL, Tenant ID, Application (Client) ID, Client Secret, and name it "Source Connection". Check "Grant access permission to all pipelines" and click Save. Repeat the same steps for the Target Connection using the Target environment URL.

Both service connections created screenshot

Both Source Connection and Target Connection are now created and visible under Service connections.


Step 4: Build Pipeline (Continuous Integration)

Navigate to Repos -> Files -> Initialize a Git Repository and configure permissions.

Initialize Git repository screenshot

Project Setting Repository Security – User Permission–contribute Allow

Repository security settings screenshot
Contribute permission allow screenshot
Install Self Host for Parallel Pipeline/Microsoft host agent
Step 1: Log in to Azure DevOps

Go to https://dev.azure.com with your account. Once you're in your organization's portal, click on Organization Settings in the bottom left corner.

Organization Settings screenshot
Step 2: Create a new Pool or use Default

Inside Organization Settings, select Agent Pools. Here you'll see a list of pools — typically there's Default (Microsoft-hosted) already there.

To create a new pool, click New Pool or reuse Default.

Agent Pools screenshot
Step 3: Download the Self-Hosted Agent

Select Default or your preferred pool. Click New Agent. This will prompt you to Download the agent package (for 64-bit or 32-bit).

Download agent package screenshot

Save this ZIP file to your machine.

Step 4: Extract and Configure

Extract the downloaded ZIP and inside, you'll see files like:

config.cmd

run.cmd

bin

Extracted agent files screenshot
Step 5: Run config.cmd as administrator

Navigate to your extracted directory. Then run: config.cmd

✅ This will launch a configuration script in cmd.

config.cmd running screenshot
Step 6: Provide Organization and Authentication

When prompted:

Enter your Server URL — typically your Azure DevOps organization's URL (e.g.: https://dev.azure.com/tenant).

Select Personal Access Token for authentication.

Server URL and authentication screenshot
Step 7: Generate and Provide PAT (Personal Access Token)

Go to your Azure DevOps profile -> Personal Access Tokens.

Personal Access Tokens menu screenshot

Click on New Token. Create a new PAT with Full Access (or custom) and expiration as needed. Copy this PAT and paste it into the configuration script.

New PAT creation screenshot
Step 8: Name Your Agent

It will ask:

"Enter agent pool (press enter for default)"

"Enter agent name"

Consider a custom, descriptive name (for example: self-hosted-agent).

Step 9: Finalize and Enable as a Service

It will scan for tool capabilities and connect successfully. Then:

Confirm working directory with Enter.

Say Y to enable service installation (run agent as service).

Say Y for the SERVICE_SID_TYPE_UNRESTRICTED

Account credentials or use network service as enter.

Agent service configuration screenshot
Step 10: Start the Service

Once configured, you can start the service:

Open Services (press Windows + S, then search Services -> run as admin).

Look for Azure Pipelines Agents with your agent's name.

Right Click on it -> Start the service if it's not already running.

Windows Services agent screenshot
Step 11: Confirm Online in Azure DevOps

Go back to Azure DevOps -> Organization Setting -> Agent Pools -> [Your Pool]. Your new agent should show up Online, ready to be used in your pipeline.

Congratulations! Your self-hosted agent is up and running. It's now available for your pipeline's parallel job execution in your CI process.

Add App to Source Control

Create a new pipeline (Classic Editor).

Select Empty Job

Add tasks in order:

Add variable

Take the solution name and put it in the variable name in the pipeline

Pipeline classic editor screenshot
Pipeline variable configuration screenshot
Solution name variable screenshot
Power Platform Tool Installer

Search and add Power platform tool installer

Power Platform Tool Installer task screenshot
Add Power Platform Export Solution

Search for the export solution and add the "Power Platform Export Solution"

Export Solution task screenshot

Set the following properties

Export Solution properties screenshot

Configure the Export Solution task: set Authentication type to Service Principal, choose the Source Connection, leave Environment URL as $(BuildTools.EnvironmentUrl), set Solution Name to $(SolutionName), and set Solution Output File to $(Build.StagingDirectory)/$(SolutionName)_unmanaged.zip. Leave "Export as Managed" unchecked.

Unpack Solution

Search for the unpack solution

Unpack Solution task screenshot

Set the following properties

Unpack Solution properties screenshot

Configure the Unpack Solution task: set Solution Input File to $(Build.StagingDirectory)/$(SolutionName)_unmanaged.zip, Target Folder to $(Build.SourcesDirectory)/$(SolutionName)/Unmanaged, and Type of Solution to "Unmanaged".

Publish Build Artifacts

Search for the "Publish build artifacts" and add that to steps.

Publish Build Artifacts task screenshot

Set the following properties.

Publish Artifacts properties screenshot

Set the Path to Publish to $(Build.SourcesDirectory)/$(SolutionName)/Unmanaged. This publishes the unpacked solution components as a build artifact.

Command Line Script

Search for the "Command line" and add that to steps

Command Line task screenshot

Add the following script in the command line:
echo commit all changes

git config user.email "test@test.com" git config user.name "Name" git checkout -B main git add --all git commit -m "code commit" git -c http.extraHeader="AUTHORIZATION: Bearer $(System.AccessToken)" push origin main
Command line script configuration screenshot

Remember to:

Use variables for solution name.

Enable "Allow scripts to access OAuth token" for Git push.

Allow scripts to access OAuth token screenshot
Save and Run

Click Save and Queue

Save and Queue screenshot

Change the settings, add commit message and click save and run

Run pipeline dialog screenshot

Check logs

Pipeline logs screenshot

The build process has now completed successfully.

Build pipeline succeeded screenshot

Step 5: Release Pipeline (Continuous Deployment)

Go to Releases → New Release Pipeline.

New release pipeline screenshot

Navigate to Pipelines → Releases in the left menu. Click "New pipeline" to create a new release pipeline.

Release pipeline view screenshot

The new release pipeline view shows two sections: Artifacts (left) and Stages (right). We need to configure both.

Add your build artifact as a source.

Add artifact source screenshot

Click "+ Add" under Artifacts. Select "Azure Repos Git" as the source type, choose your project, select the repository and "main" branch, set Default version to "Latest from the default branch", and click Add.

Add stage empty job screenshot

After the artifact is linked, click "+ Add a stage" under Stages. Select "Empty job" from the template list.

Name the stage screenshot

Name the stage (e.g., "Stage 2") and click on "1 job, 0 task" to start adding tasks.

Rename stage to First Release screenshot

Rename the stage to "First Release" under the Tasks tab. This is where you'll add the release tasks.

Pipeline variable SolutionName screenshot

Go to the Variables tab and add a pipeline variable: Name = SolutionName, Value = your solution's internal name (e.g., PipelinesAzureDevOpsDemo).

In the stage:

Tool Installer
Release Tool Installer task screenshot

Search for "Power Platform Tool Installer" and click Add. This must be the first task in the release stage.

Pack Solution
Pack Solution search screenshot

Search for "pack" and add the "Power Platform Pack Solution" task.

Pack Solution browse source folder screenshot

In the Pack Solution task, click the browse button (...) next to Source Folder. Navigate to the linked artifact's Unmanaged folder inside your solution directory.

Pack Solution properties screenshot

Configure the Pack Solution properties: set Source Folder to $(System.DefaultWorkingDirectory)/_Power Apps CI-CD Pipeline/$(Build.SourceDirectory)/$(SolutionName)/Unmanaged, Solution Output File to $(Build.StagingDirectory)/$(SolutionName).zip, and Type of Solution to "Unmanaged".

Import Solution
Import Solution search screenshot

Search for "import" and add the "Power Platform Import Solution" task.

Import Solution properties screenshot

Configure the Import Solution task: set Authentication type to "Service Principal/client secret", select the Target Connection as the service connection, leave Environment URL as $(BuildTools.EnvironmentUrl), and set Solution Input File to $(Build.StagingDirectory)/$(SolutionName).zip. Check "Import solution as asynchronous operation".

Publish Customizations
Publish Customizations search screenshot

Search for "publish" and add the "Power Platform Publish Customizations" task.

Publish Customizations properties screenshot

Configure Publish Customizations: set Authentication type to "Service Principal/client secret", select the Target Connection, and leave the Environment URL as default. Check "Publish Customizations as asynchronous operation".

Save release pipeline screenshot

Click Save at the top-right. Add a comment (e.g., "Release Created") and click OK.

Create a release.
All four tasks visible screenshot

Once saved, all four tasks are visible in the stage. Click "Create release" at the top-right.

Create new release dialog screenshot

In the "Create a new release" dialog, confirm the stage ("First Release"), verify the artifact version, add a release description (e.g., "Prod Release"), and click Create.

Release created banner screenshot

The release is created. A banner confirms "Release-1 has been created."

Monitor logs and verify the deployment in the target environment.

Deploy stage dropdown screenshot

Click the Deploy dropdown and select "Deploy stage" or "Deploy multiple" to trigger the deployment.

Deploy release panel screenshot

In the Deploy release panel, select the "First Release" stage, optionally add a comment, and click Deploy.

Release in progress screenshot

The release is now in progress. You can see the stage status showing "In progress" with a task counter and timer.

Release succeeded screenshot

The release has succeeded! The "First Release Stage" shows a green "Succeeded" status.

Solution in target environment screenshot

Verify the deployment by navigating to the target environment in Power Apps (make.powerapps.com). The solution (e.g., "Pipelines Azure DevOps…") now appears in the Solutions list, confirming a successful CI/CD deployment.


Conclusion

Congratulations! You now have an end-to-end automated pipeline for deploying Power Platform solutions using Azure DevOps. This setup:

  • Reduces manual effort
  • Ensures consistency across environments
  • Improves delivery speed and confidence

With this CI/CD process, you're better equipped to handle modern ALM practices for Power Platform.

If you need assistance implementing Power Platform ALM or automating enterprise deployments, feel free to contact our SharePoint & Power Platform consulting team here.