Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.3k views
in Technique[技术] by (71.8m points)

serviceconnection - Power Platform DevOps Tools new environment creation task

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...