In attempting to automate source control / build / release tasks, our org recently looked into using DevOps with Power Apps Build Tools.
Wanted to share our experience here to see if anyone else had similar problems.
So far, we’ve only started with the Export/Unpack pipeline for migrating a solution from a dev environment into source control in DevOps.
We had a lot of trouble with the service connection to CDS. When I was attempting to connect with my credentials (sys admin in environment with dynamics service admin role in 365 center), the Export Solution task would always time-out in the pipeline.
Our org uses MFA by default on all office365 accounts as the rule; it takes a special exception (read; act of god) for non-MFA access. I suspect that the service connection was the issue because it was setup with my credentials (which would prompt MFA).
So, we attempted to change the service connection using a service principal. We created a new app registration in azure and configured an application user in the target CDS environment that was connected to the app registration. The app user was granted system customized role. We then reset the DevOps service connection to use the service principal. No luck- still timeout.
Next, we ended up creating a new Office 365 user in exchange and our exchange admin set it to not require MFA. We gave the account a D365/PowerApps/Flow license and when the account synced to the CDS environment, assigned it the system customizer role. I verified the user was set to Read\Write and then logged in as this new user to verify that I didn’t get MFA prompts. Success.
Back in DevOps, we changed the service connection to use this new user account’s credentials and reran they build pipeline. Success.
So, we are now in a space where the following is less than ideal because we had to create a user that consumes licenses.
Is there something that we’re missing on getting a service principal working correctly for the DevOps tasks?