Archive

Posts Tagged ‘Failed to connect’

Azure DevOps (ADO) | Pipeline failure | Failed to connect to Dataverse

September 16, 2021 Leave a comment

One of my ADO pipelines ‘Power Platform Publish Customizations’ task failed with “Failed to connect to Dataverse” error.

Reason:

  • ‘Power Platform Publish Customizations’ task’s ‘Authentication type’ was selected as ‘Username/password’ which does not have MFA support.
  • MFA (Multi Factor Authentication) was enabled on the Environment, which I was trying to connect from the Pipeline.
  • Since the ‘Power Platform Publish Customizations’ task’s ‘Authentication type’ was selected as ‘Username/password’ which does not support MFA, pipeline could not connect to the Dataverse environment.

Fix:

  • Create an ‘Application User’ by completing App Registration in Azure Active Directory and grant a Security Role.
  • In the ADO pipeline’s ‘Power Platform Publish Customizations’ task, select ‘Authentication type’ as ‘Service Principal’.
  • Make sure the ‘Service Connection’ configured properly with Azure App Registration details (i.e., Tenant ID, Application ID and Client Secret).
    • My connection name is ‘SP_ExpAugust21’ and details are as follows.
  • Save and run the pipeline and it should work now.

🙂

Advertisement