Skip to content

[power-automate][Bug] edit_flow/update_flow cannot save an unmanaged-solution flow with connection references (runtime definition not transformed to design-time) #287

Description

@edbellman

Plugin: power-automate v2.0.0 (marketplace commit eec8ece)

Summary

get_flow returns a flow's runtime-bound definition, but edit_flow / update_flow send that form verbatim to the Dataverse solution save endpoint, which requires the design-time form. For any unmanaged-solution flow whose connector actions use connection references, a save is impossible without manually rewriting every OpenApiConnection action's host.

Repro

  1. get_flow on an unmanaged-solution flow with OpenApiConnection actions (connection references with source: "Invoker" + connectionReferenceLogicalName).
  2. edit_flow to add a single action (e.g. a Respond to a PowerApp or flow), then apply.

Actual — two sequential 400s

  1. WorkflowRunActionInputsInvalidPropertythe inputs of action … should not have the property authentication. (This one is documented in references/error-troubleshooting.md: "remove it — PA auto-injects on save.")
  2. After stripping authentication from every action: WorkflowRunActionInputsMissingPropertythe inputs of action … is not valid. Property host.connectionReferenceName is missing. This is not documented.

Root cause

The runtime host returned by get_flow looks like:

{ "apiId": "/providers/Microsoft.PowerApps/apis/shared_sql", "connectionName": "shared_sql", "operationId": "ExecuteProcedure_V2" }

plus an injected authentication block. The solution save path instead wants the design-time form:

{ "apiId": "", "operationId": "", "connectionReferenceName": "<logical name>" }

with no authentication. Neither edit_flow nor update_flow performs this transform (strip authentication; map connectionName → the matching connectionReferences[].connectionReferenceLogicalName). references/definition-reference.md documents only the non-solution host.connectionName shape.

Expected

edit_flow / update_flow transform the runtime definition to design-time on save for solution flows (the maker portal does this natively) — or, at minimum, the docs describe the required manual transform.

Impact

Structural edits to unmanaged-solution flows with connection references are impossible via the MCP tools; the only workaround is the maker portal. (Managed-solution flows are already guarded behind forceManaged; this is the unmanaged-solution case the code comments state is supported.)

Environment

  • power-automate plugin v2.0.0
  • MCP tools: get_flow, then edit_flow (also applies to update_flow)
  • Flow: unmanaged solution ("Active"), PowerAppV2 trigger, OpenApiConnection actions (SQL / Office 365 / SharePoint), connection references with source: "Invoker"

Disclaimer: I investigated and drafted this issue with Claude Code (Anthropic) — it read the plugin source and docs and reproduced the failure against a live flow. I've reviewed and verified the report before filing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions