
π Build Your First Azure DevOps Pipeline for Power Platform (Complete Beginner Tutorial!)
Contents
Your First Azure DevOps Pipeline for Power Platform β A Complete Beginnerβs Guide
Have you ever wondered how to set up Azure DevOps pipelines for the Power Platform?
Ever wished you could export your solutions safely, run tests, add security checks, generate documentation, or deploy across tenants with confidence?
All of this becomes simple once you introduce Azure DevOps into your Power Platform ALM story β and in this guide (based on my YouTube walkthrough), Iβll show you exactly how to build your first Azure DevOps pipeline.
Whether you’re brand new to DevOps or just automating your Power Platform workflows, this guide will get you from nothing to a working pipeline step-by-step.
π₯ Watch the video tutorial
Introduction
In this walkthrough, weβre going to build a simple Azure DevOps pipeline that:
β Connects securely to your Dataverse environment
β Exports a Power Platform solution
β Unpacks it into source control
β Commits the changes to your repository
Later, you can extend this pipeline to build, deploy, test, create documentation, enforce ALM governance, and much more β but today we focus on getting your first working pipeline running.
Prerequisites
Before we touch DevOps, we need three things.
1. Dataverse System Administrator permissions
You need the ability to add/remove users (because weβll add a service principal).
2. An Azure DevOps organisation (Basic licence)
The first five are free, so you’re almost certainly covered.
3. Parallelism Request (free)
Azure DevOps uses a hosted VM to run pipelines, but you must request free parallelism.
Submit it here:
https://aka.ms/azpipelines-parallelism-request
Approval normally takes a few minutes.
After that, install the Power Platform Build Tools extension from the Visual Studio Marketplace.
Step 1 β Create an App Registration
We need a service principal so our pipeline can authenticate to Dataverse.
- Open Entra Admin Center β App Registrations
- Select New Registration
- Add API permission Dynamic CRM β user_impersonation
- No admin consent required
- Copy:
- Client ID
- Tenant ID
- Secret
Keep them safe β weβll need them later.
Step 2 β Add the App User in Dataverse
In the Power Platform Admin Center:
- Open your environment
- Go to Settings β Users β Application Users
- Click New App User
- Choose your App Registration
- Assign System Administrator (for demo purposes)
Step 3 β Create the DevOps Service Connection
In Azure DevOps:
- Open Project Settings β Service Connections
- Select New Service Connection β Power Platform
- Enter:
- Environment URL
- Client ID
- Tenant ID
- Secret
- Name it something like Dataverse - Backup
This will be the authentication method for your pipeline.
Step 4 β Structure Your Repository
A recommended structure:
MyPowerPlatformProject/
βββ solutions/
β βββ src/
β β βββ MySolution/
β βββ MySolution.zip
βββ pipelines/
β βββ export-solution.yml
β βββ build-and-deploy-solution.yml
βββ documentation/
βββ README.md
Step 5 β Create Your First Pipeline
Inside Pipelines β New Pipeline:
- Choose Azure Repos Git
- Select your repo
- Choose Starter Pipeline
- Save it under:
/pipelines/export-solution.yml
Your first run will likely fail due to parallelism β this is normal.
Step 6 β Fix Parallelism (If Needed)
If you get an error about free parallelism not being enabled:
π Submit the form: https://aka.ms/azpipelines-parallelism-request
Once approved, rerun your pipeline β it should now work.
Step 7 β Build the Export Pipeline
Now we turn the basic boilerplate pipeline into something useful.
1. Add name + variables
name: $(TeamProject)_$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)
variables:
- name: varPowerPlatformSPN
value: Dataverse - Backup
- name: varSolutionName
value: ExpenseReportManager1
2. Use Windows build agent
pool:
vmImage: 'windows-latest'
4. Pipeline Steps
steps:
- checkout: self
persistCredentials: true
clean: true
- task: PowerPlatformToolInstaller@2
inputs:
DefaultVersion: true
AddToolsToPath: true
- task: PowerPlatformSetSolutionVersion@2
inputs:
authenticationType: 'PowerPlatformSPN'
PowerPlatformSPN: '$(varPowerPlatformSPN)'
SolutionName: '$(varSolutionName)'
SolutionVersionNumber: '1.0.0.$(Build.BuildID)'
- task: PowerPlatformExportSolution@2
inputs:
authenticationType: 'PowerPlatformSPN'
PowerPlatformSPN: '$(varPowerPlatformSPN)'
SolutionName: '$(varSolutionName)'
SolutionOutputFile: '$(Build.SourcesDirectory)\solutions\$(varSolutionName)_1.0.0.$(Build.BuildID)_managed.zip'
Managed: true
AsyncOperation: true
MaxAsyncWaitTime: '60'
- task: PowerPlatformExportSolution@2
inputs:
authenticationType: 'PowerPlatformSPN'
PowerPlatformSPN: '$(varPowerPlatformSPN)'
SolutionName: '$(varSolutionName)'
SolutionOutputFile: '$(Build.SourcesDirectory)\solutions\$(varSolutionName)_1.0.0.$(Build.BuildID).zip'
Managed: false
AsyncOperation: true
MaxAsyncWaitTime: '60'
- task: PowerPlatformUnpackSolution@2
inputs:
SolutionInputFile: '$(Build.SourcesDirectory)\solutions\$(varSolutionName)_1.0.0.$(Build.BuildID).zip'
SolutionTargetFolder: '$(Build.SourcesDirectory)\solutions\src\$(varSolutionName)'
SolutionType: 'Both'
- task: PowerShell@2
inputs:
targetType: 'inline'
script: 'pac solution create-settings --solution-zip $(Build.SourcesDirectory)\solutions\$(varSolutionName)_1.0.0.$(Build.BuildID).zip --settings-file $(Build.SourcesDirectory)\solutions\$(varSolutionName)-settings.json'
3. Commit to the repository
- task: CmdLine@2
inputs:
script: |
echo commit all changes
git config user.email "$(Build.RequestedForEmail)"
git config user.name "$(Build.RequestedFor)"
git checkout -b main
git add --all
git commit -m "Latest solution changes."
echo push code to new repo
git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push origin main
Step 8 β Fix Build Service Permissions (If Needed)
If you see:
βBuild Service does not have Contribute permissionsβ
Fix it here:
Project Settings β Repositories β {repo} β Security
Find:
ProjectName Build Service (ProjectName)
Set Contribute = Allow
Re-run β pipeline succeeds.
Step 9 β Review the Exported Solution
Your repo now contains:
β Managed ZIP
β Unmanaged ZIP
β Settings file
β Unpacked solution including:
- Entities
- Model-driven apps
- Canvas apps (if any)
- Workflows
- Security roles
- Choices
- Relationships
- Customizations
- Plans
Everything you need for full Git-based version control.
Conclusion
π Congratulations β you now have a working Azure DevOps export pipeline!
This pipeline gives you:
β A safe, repeatable backup
β Git history of every solution change
β Managed + unmanaged builds
β A foundation for full ALM automation
From here, you can expand into:
- Deployment pipelines
- Automated versioning
- Power Pages / Portal pipelines
- Automated documentation
- Solution analysis & testing
- Cross-tenant deployments
- Pull request validation
If youβd like the next blog/video to cover solution deployment, unit testing, wiki documentation generation, or advanced ALM, just let me know!



