1

I am trying to setup Azure DevOps pipeline for Power Platform environment creation. I have created the App Registration in Azure AD. Now I am struggling to create the Power Platform service connection to be used by the environment creation task. What should I put for the server url since the environment doesn't exist yet? Also one of the pre-requisite is to add the registered App ID to the Power Platform environment and assign a security role. In my case since the environment doesn't exist yet how is this user association created? Any help much appreciated, I am really not sure what I might be missing.

shaswata pal
  • 389
  • 3
  • 15

1 Answers1

0

The document offered a script to facilitate some of the steps required in the section below, while detailed information with manual step-by-step instructions are available here.

This PowerShell script first registers an Application object and corresponding Service Principal Name (SPN) in AAD and then added as an administrator user to the Power Platform tenant itself.

Download the following PowerShell cmdlet: https://pabuildtools.blob.core.windows.net/spn-docs-4133a3fe/New-CrmServicePrincipal.ps1

  • Open a regular Windows PowerShell command prompt (standard, not PS core)
  • Navigate to the folder where you saved the script, and unblock the script using the following command: Unblock-File New-CrmServicePrincipal.ps1
  • Run the script: .\New-CrmServicePrincipal.ps1

The script will prompt two times with AAD login dialogs:

  • 1st prompt: to login as administrator to the AAD instance associated with the Microsoft Power Platform tenant
  • 2nd prompt: to login as tenant administrator to the Microsoft Power Platform tenant itself

Once successful, 3 columns are displayed:

  • Power Platform TenantId
  • Application ID
  • Client Secret (in clear text)

Use the information displayed to configure the Power Platform service connection.

Server URL: The service endpoint for the source and the target environment that you want to export and import the solution to. For example, https://powerappsbuildtools.crm.dynamics.com. Service endpoints can be defined under Service Connections -> Generic Service Connection in Project Settings.

You can follow this instructional document and video for detailed steps.

Hugh Lin
  • 17,829
  • 2
  • 21
  • 25
  • powerappsbuildtools in this case is an existing instance as you are importing and exporting a solution. In my case I am creating a new instance - there is no server url yet for the instance - so what should I put? – shaswata pal Jan 13 '21 at 06:40