Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 29, 2026

External applications (SharePoint Work Tracker, etc.) create Power Platform solutions that remain as empty shells when the source is deleted. CoE currently flags orphaned flows but has no mechanism to identify or clean empty solutions.

Analysis Deliverables

Comprehensive Technical Analysis

ENHANCEMENT-ANALYSIS-Empty-Solutions-Cleanup.md - 37KB technical specification covering:

  • Feasibility: ✅ Approved - solutioncomponents API already in use, cleanup patterns exist
  • Implementation approach: Hybrid solution combining new cleanup flow with enhanced tracking
  • Data model: Add 3 fields to admin_Solution (component count, empty flag, detection date)
  • New flow: CLEANUPHELPER-EmptySolutions with configurable age threshold and Flag/Delete modes
  • Risk assessment: Low risk with multiple safeguards (disabled by default, unmanaged-only, age-based)
  • Effort estimate: ~2 weeks (1 sprint)

Executive Summary

docs/ENHANCEMENT-SUMMARY-Empty-Solutions.md - Stakeholder-focused overview with decision points and phase breakdown.

Technical Approach

Leverages existing infrastructure:

// Query solution components during sync
GET /solutioncomponents?$filter=_solutionid_value eq '{id}'&$select=solutioncomponentid

// Store count in admin_Solution for efficient cleanup queries
item/admin_componentcount: @length(outputs('Get_Solution_Component_Count'))
item/admin_isemptysolution: @equals(length(...), 0)

Cleanup flow filters by:

  • admin_isemptysolution = true
  • admin_emptysolutiondetecteddate <= threshold (default 30 days)
  • admin_solutionismanaged = false (unmanaged only)
  • Excludes system/Microsoft publishers

Implementation Phases

  1. MVP (1 week): Component count tracking + Flag mode
  2. Phase 2 (3 days): Delete mode + environment variables
  3. Phase 3 (2 days): Dashboard views + documentation
  4. Future: Approval workflow, notifications, exclusion lists

Recommendation

Approve for implementation - solves reported customer issue using existing patterns with appropriate safeguards.

Original prompt

This section details on the original issue you should resolve

<issue_title>[CoE Starter Kit - Feature]: Clean up tasks - Empty Solutions</issue_title>
<issue_description>### Is your feature request related to a problem? Please describe.

I haven't been able to find any mapping to specific solutions from an app or flow, only IsSolutionFlow.

Looking for a way to clean up empty solutions...

Background:

External Microsoft applications that trigger the creation of any items in the Power Platform do not monitor or perform any clean-up for said items in Dataverse.

Example
Ie, A SharePoint Work Tracker created via a SharePoint List, creates a Flow in Power Automate and a Solution in the Default environment.

What is happening:
If the List is deleted in the same SharePoint GUI, the Solution and Flow are not removed or marked as orphaned / disconnected. The Flow simply fails as it cannot find the list.
The solution has no changes applied to it.

While the CoE eventually flags the disabled Flow for cleanup, the Solution remains empty.

Describe the solution you'd like

Cleanup Flow that looks for empty solutions and removes them.

Describe alternatives you've considered

References to Solution and parent environment in the Apps / Flows tables

Additional context?

No response</issue_description>

<agent_instructions>Analyze the enhancement request described in the ticket. Provide a comprehensive evaluation that includes:
Understanding & Summary
Summarize the enhancement request in clear, concise terms.
Identify the core problem the enhancement aims to solve.
Feasibility Assessment
Determine whether the requested enhancement is technically feasible.
If not feasible, explain the blockers or limitations.
Proposed Implementation Approach (only if feasible)
Outline the required code, architectural, or configuration changes.
Identify all affected files, components, or modules.
Describe potential risks, dependencies, or compatibility considerations.
Step‑by‑Step Implementation Plan
Provide a detailed, sequential explanation of what changes should be made.
Include reasoning behind each step to ensure clarity for reviewers and maintainers.
Deliver the analysis in a structured format using headings, bullet points, and code blocks when necessary</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@harini-2-y Hi @RandomDepartmentofThings , Thank you for raising this enhancement request and for sharing the detailed feedback. This request will be reviewed and tracked for consideration in a future update.

Custom agent used: CoE Custom Agent
Specialized agent for triaging and fixing issues in the CoE Starter Kit. Always consult the official CoE docs and the team’s SharePoint notes first, then mine prior GitHub issues and the CoE Common Responses playbook.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 29, 2026 09:51
…up feature

Co-authored-by: AmarSaiRam <220305901+AmarSaiRam@users.noreply.github.com>
Co-authored-by: AmarSaiRam <220305901+AmarSaiRam@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement cleanup for empty solutions in Dataverse Enhancement analysis: Empty solution cleanup capability Jan 29, 2026
Copilot AI requested a review from AmarSaiRam January 29, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CoE Starter Kit - Feature]: Clean up tasks - Empty Solutions

2 participants