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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard