Hi,
Both errors are classic post-pipeline symptoms, and the fix is on the target environment side, not the solution itself. Working through them:
Error 1 — ConnectionAuthorizationFailed when turning on the flow
The green check in the pipeline UI confirms a connection of that connector type exists in TEST — it does not confirm the deploying identity is the owner of that connection or has it shared in the "context of this flow." When the pipeline service activates the flow, it activates it as the deploying user, and that user must own (or be granted use of) the connection that the connection reference is bound to.
- In TEST, sign in as the same identity that runs the pipeline.
- Go to Power Automate → Data → Connections and confirm a SharePoint connection exists, owned by that identity.
- Open the solution in TEST → the SharePoint connection reference → ensure it's bound to that connection, not to one owned by someone else.
- Re-run "Turn on" on the flow. Reference: Manage connections in pipelines and Use connection references and environment variables in pipelines.
Error 2 — InvalidOpenApiFlow / "List not found" (404)
This means at least one of the flows still has the DEV SharePoint Site Address and/or List ID hard-coded in its action JSON. Connection references swap the authentication, but they don't rewrite a hard-coded list GUID — that's what environment variables are for.
- In DEV, create two environment variables in the solution: one of type SharePoint Site (Data source) and one of type SharePoint List (Data source). Microsoft added these data-source types specifically for this scenario. See Manage SharePoint sites and lists with environment variables.
- Open each flow's SharePoint action and re-pick Site Address → Enter custom value → select the environment variable. Do the same for List Name.
- Re-export, re-import via the pipeline, and supply the TEST site/list values during deploy (or set them as Current Value in TEST after import — but ideally at deploy-time so there's no unmanaged layer).
- Reference: Environment variables overview.
What pipelines do not carry across — re-apply per environment
Avoiding unmanaged layers
The supported way to set TEST-specific values without creating an unmanaged layer is to set Current Value on environment variables during the pipeline deploy step (the pipeline prompts for them), or use a Deployment Settings file committed alongside the solution. Editing the imported managed solution components directly in TEST is what produces unmanaged layers — avoid that. Reference: Pre-populate connection references and environment variables for automated deployments.
Run order I'd suggest: (1) fix the connection ownership in TEST and re-turn-on one flow to confirm Error 1 clears, (2) parameterize the SharePoint site/list with environment variables in DEV, (3) re-deploy with the deployment settings populated for TEST.
Found this helpful? Please mark ✅ "Does this answer your question?" so others searching for the same issue can find it quickly. A 👍 on "Was this reply helpful?" or a ♥ Like is also much appreciated!
Raghav Mishra — LinkedIn | PowerAI Labs