This article explains how to deploy power apps using the Azure DevOps CI/CD pipeline. We ‘ll go through different steps from the creation of the environment to the pipeline.
Create Environment :
Go to this Url and connect using the Delegated Admin Account:
And select the right customer
Go to Service Management and choose Microsoft Power Platform to access the admin center where the environment gonna be created.
Then click on New , and add the different settings.
FYI: If the environment is either for test or dev choose Sandbox as Type
After the creation of the environment, you still can edit and adjust the security, Url …
Create App registration in Azure:
-Check the followed link:
Create Administrative user
A non-interactive user is a disabled user which cannot do anything and is not consuming a license (because they can’t access CRM), follow the below steps to create one :
- Create a user account in the Office 365 Admin Center.
Be sure to assign a Dynamics 365 (online) license to the account.
- Go to Dynamics 365 (online).
- Go to Settings > Security.
- Choose Users > Enabled Users, and then click a user’s full name.
- In the user form, scroll down under Administration to the Client Access License (CAL) Information section and select Non-interactive for Access Mode.
You then need to remove the Dynamics 365 (online) license from the account.
- Go to the Office 365 Admin Center.
- Click Users > Active Users.
- Choose the non-interactive user account and under Product licenses, click Edit.
- Turn off the Dynamics 365 (online) license, and then click Save > Close multiple times.
- Go back to Dynamics 365 (online) and confirm that the non-interactive user account Access Mode is still set for Non-interactive.
If in power app you have three environments for dev , test, and Live we‘ll need each time to move the change through them to export the solutions which take time :-) and import them. Now pipeline can do this automatically with only one click: push.
Setup Azure DevOps:
At this stage we‘ll need the saved client secret and Id in the previous steps , in order to create the connection with CRM.
Now in the library create new variable group .
Inside the variable group add for each environment new variable which contains as value the connection string like this example:
Then you are ready to start creating the pipeline. In general, we have to create two pipelines one for ensuring continuous integration which will build the solution and prepare the artifacts and the second one is continuous delivery which will deploy those artifacts to the new host.
In the CRM case, each solution (plugin, web resource, customization, workflow ) has to have a build pipeline and we just need one pipeline for the release.
2-Select Azure git Repo
3-Select the specified repo
4-Add the script yml:
Example to build customization solution:
After adding the yml scripts your pipelines are ready to test.