powerplatform-build-tools icon indicating copy to clipboard operation
powerplatform-build-tools copied to clipboard

Microsoft PowerPlatform CLI - "Power Platform Import Solution"

Open demasj opened this issue 2 years ago • 6 comments

Our team is suddenly receiving error messages when they initiate a release to the different environments. It fails at the 'Power Platform Import Solution' step with the following error message. Is this already known, and is there a solution for this?

2023-10-04T11:15:11.0687613Z ##[error]error: 1 2023-10-04T11:15:11.0699230Z ##[error]failed: Connected to... *** Connected as ***

Solution Importing... Microsoft PowerPlatform CLI Version: 1.27.6+g9f62afb Online documentation: https://aka.ms/PowerPlatformCLI Feedback, Suggestions, Issues: https://github.com/microsoft/powerplatform-build-tools/discussions

Error: An unexpected error occurred. An unexpected error occurred.

demasj avatar Oct 04 '23 11:10 demasj

Can you please share the pac-log.txt? log file path can be found using "pac telemetry status". Will take a look. Thanks for reporting.

snizar007 avatar Oct 04 '23 16:10 snizar007

It also helps to run your pipeline with "Enable Diagnostics" which will give you more details about the error

petrochuk avatar Oct 04 '23 23:10 petrochuk

"I have converted my classic pipeline to YAML, and now I was able to enable the 'Enable Diagnostics' option. Please see the attached LOG file for reference. Log.txt

demasj avatar Oct 06 '23 14:10 demasj

You can see the error:

Request failed with: Forbidden and error: {"error":{"code":"ConnectionAuthorizationFailed",
"message":"The caller with object id '****************' does not have the minimum required permission 
to perform the requested operation on connection '*********' under API 'shared_sql'."}} and request url 

petrochuk avatar Oct 06 '23 14:10 petrochuk

Yes, I noticed that as well. The Service Principal Name (SPN) I am using has both the 'System Administrator' and 'System Customizer' roles in the environment. Although I suspect that the latter role may not even be necessary.

demasj avatar Oct 06 '23 14:10 demasj

After I shared the 'Connection' with the Service Principal Name (SPN) that the pipeline is needed to set with the settings.json file, it started working.

I didn't need to share the connection with the 'System Administrator' before. Is this behavior as expected?

demasj avatar Oct 06 '23 14:10 demasj