web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Request: Detect if sol...
Power Apps
Unanswered

Request: Detect if solution exists in environment

(0) ShareShare
ReportReport
Posted on by 15

THE PROBLEM:

It is often required that solutions be deployed using Azure DevOps Pipelines. Sometimes there are often several iterations or environment rebuilds that must occur before the initial go-live of a solution, meaning that importing the solution into an environment for the first time (or after a rebuild) must use the stage-and-upgrade strategy rather than the import-as-holding strategy. However, subsequent imports into that same environment may require the import-as-holding strategy (e.g. deployment consists of multiple layer solutions or mid-deployment tasks must be carried out before upgrade occurs). However, importing the solution as a holding solution will fail if the solution does not already exist in the environment.

 

CURRENT LANDSCAPE:

Currently, Microsoft does not provide a task or simple method for detecting if a solution already exists in an environment, and the current Solution Import task will not perform this detection either. It is left to the implementor to find a way around this problem. Running the PAC CLI inside the pipeline is one option (pac solution list), but setting this up and parsing the output is a nuisance and too much effort for some people. We also can't be certain that the format of the CLI output will remain constant, meaning a change in format could break whatever parsing mechanism we assemble.

 

Third party tools might be another option, but some orgs or not too keen on the idea of granting third party party code access to their environments or repos.

 

THE ASK:

Any of the following enhancements to the suite Power Platform Build Tools:

  • Update the Solution Import task to detect if the solution exists in the target environment, and then fallback to stage-and-upgrade if it does not exist. Similarly, update the Apply Upgrade task to detect if the solution can be upgraded, and if not, then simply continue instead of producing an error.
  • Provide a new Solution List task that outputs a list of solutions present in the target environment (in an easy-to-consume format like a JSON dictionary/object) so that the implementor can perform this check easily and set the correct import strategy on the Solution Import task
  • Provide a new Get Solution task, with a solution name input, and multiple outputs that match the pac solution list outputs for that single solution
  • Provide a new Check If Solution Exists task, with a solution name input, and a solution exists output (true/false)
I have the same question (0)
  • Andrew7 Profile Picture
    Microsoft Employee on at

    It might be good to share this idea here: microsoft/powerplatform-build-tools · Discussions · GitHub

  • davidjenkins Profile Picture
    15 on at

    Thanks, @Andrew7 I've created the discussion here: https://github.com/microsoft/powerplatform-build-tools/discussions/900

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 633

#2
11manish Profile Picture

11manish 588

#3
Valantis Profile Picture

Valantis 457

Last 30 days Overall leaderboard