Azure DevOps Service Connection
Azure DevOps Pipelines agents might require to access some resources in order to build or deploy the solution. A good example is the DbMigrator project that is being executed by the Release pipelines. Since our database authentication is now managed by Microsoft Entra, we need to provide an Entra user that will be used to execute our Pipeline.
In Azure DevOps, open your Project Settings, and go under Pipelines, then Service Connections. Then create a new Service Connection. Select Azure Resource Manager.
-b88295277abab15f257dbba2d1df6a7b.png)
Select Worklocal Identity Federation (automatic).
-641809fb1d53cc4a6436ea4bc84c21f4.png)
Pick the right subscription and specify a service connection name that you will be able to reuse, appname. You may specify the Management Group or not, depending on your situation or if your service connection will require access to multiple management groups. Hit Save.
-56478060547e4135eda0028aee3b8dec.png)
Once created, open your Service Connection and click on Manage Service Principal, this will open the portal and will allow to change the Display name which is not really friendly.
-930cab20a160dcb3266d66a3b9972deb.png)
Rename the Service Principal appropriately, keep that name somewhere as it will be needed when you will want to grant access to resources.
-a46dcbaab5e473bb5b5766b3012e9bc6.png)