Azure DevOps ALM – Setup
After my not so recent post comparing the relatively new built-in Power Platform Pipelines to Azure DevOps, this is a guide on how to build your ALM processes in DevOps, as it can become quite complex and confusing. The whole process will be split between multiple blog posts, in order, so it’s not too overwhelming and each unique stage can be understood clearly and prepared for correctly.
All examples below will use my organisation environment structure, for ease of explanation via consistency. Dev, QA, UAT, Live with solutions exported from Dev and into the others in turn.
Initial Reading and Preparation
To reiterate one thing from the previous post, all tasks within DevOps are ultimately wrapped for the Power Platform CLI and I would highly recommend reading this first, as even though we are not using it directly, it will help to debug problems.
To understand the basics of what the build tools are, read this page but refrain from setup for now. I will cover this via App Registrations within Azure Portal, which is visually more understandable and maintainable. You can decide to do things differently in the future if you choose.
Read about deployment settings files prior to even thinking about DevOps, as they are fundamental to using DevOps. You will not be able to populate connection reference or environment variable values without them.
Ensure you or an infrastructure colleague have access to Azure Portal from your infrastructure teams. Good practice is this being a different from your regular account, such as an admin account.
Ensure you or a colleague have access to the environments you wish to include, as above typically via an admin account.
Azure App Registration
The following steps below should be repeated for each environment you wish to use in your ALM process. 4 app registrations are required in this example to ensure isolation and security.
Sign into portal.azure.com
Open App registrations
Select New registration
Enter a meaningful and consistent name, such as Dataverse – ALM – Env Name
In app registration, select Certificates & secrets
Click New secret and enter a meaningful name and select chosen dates
Copy value
Do not store this anywhere after you have used it in steps below, it is a security risk.
In Overview, copy Application (secret ID)
Copy Directory (tenant) ID
Power Platform Admin Centre
Sign into the admin centre
Select your first environment (Dev)
Select Users on the right
Select app users list link at the top
Select New app user then add an app
Search for name of app registration you created above and add
Select appropriate business unit
Assign system administrator role
Create
Repeat the above steps for the other 3 environments, ensuring the use the 3 other app registrations from above. This will result in the 4 environments each having their unique app users assigned to them.
Azure DevOps Service Connections
Sign into your organisations DevOps instance
In bottom left, select project settings, service connections
Select New service connection, then Power Platform
Ensure Application Id and client secret is selected
Enter URL of Power Platform environment, for example https://my-dev-env.crm11.dynamics.com
Enter directory/tenant ID from above into Tenant ID
Enter application ID from above into Application ID
Enter secret value from above into Client secret of Application ID
Enter descriptive name
Ensure grant access permission is ticked
Repeat the above steps for the other 3 environments, using the details copied from the 3 remaining app registrations.
Summary/Next…
This will get you to the point where the services are connected and you are ready to start the build part of your pipeline. This will be in the next post, followed by releases.