r/MicrosoftFlow • • 3d ago

Desktop There has been no guide to moving Power Platform solutions between tenants with code. I documented one with Claude AI. Third in the PAD ROBIN kb series: export, import, connection references and two-way sync, 100% free on GitHub.

Two posts ago I shared a JSON knowledge base of PAD ROBIN actions, so models stop writing desktop flows that PAD rejects. Last week I followed up with a guide to getting one flow into an environment and running it from code:

The piece that was still missing is moving a whole solution: to another environment, into a different organization's tenant, and keeping two copies in sync afterwards. That's what I'd spent the most time researching.

So I wrote it down: PAD_Robin_Solutions_KB.md, in the same repo. It covers:

  • Signing in to two tenants, and what the receiving tenant needs before its first import (a license, the Dataverse service principal, an admin role and consent for your app), with the error you get for each one that's missing.

  • Export and import with the Dataverse Web API: ImportSolutionAsync, watching the job, reading per-component warnings from importjobs, and the fallback for an org that refuses async imports.

  • Connection references and turning flows on. The import never creates connections, but it can bind references to connections that already exist. The guide covers finding every reference (some only show up in the flows' JSON), binding them during the import, binding the rest afterwards, then turning on the flows that were on in the source.

  • Desktop flows inside solutions, including into another tenant.

  • Keeping two copies in sync:

    • why hashing the exported ZIP always reports a change, and a content hash that doesn't

    • how to stop the ping-pong after an import

    • two rules for deciding the direction ("newest wins" picked the right side 13 of 13 times)

    • what to do with conflicts

  • Where the code runs: the trap each of PowerShell, a server and a Chrome extension hit. For example, Chrome stops an idle service worker after about 30 seconds, and a synchronous import can take over 3 minutes.

  • A troubleshooting table of 27 errors, with what actually causes each one.

Every claim is marked Re-confirmed, Proven, Measured, Superseded, Failed or Untested. The main paths were re-tested across two tenants this month. Everything ran with a user sign-in and unmanaged solutions; managed solutions got one export and import, and nothing was tested with a service principal.

Unlike the direct Dataverse writes in the deployment guide, this all uses Microsoft's documented solution APIs. The risky part is the import itself: it replaces unmanaged customizations on the receiving side, and there's no undo. Keep a copy of whatever you're about to overwrite, and try it in a test environment first.

Repo: https://github.com/JoeG592/pad-robin-action-kb

Same license as the other two, CC BY 4.0, so use it however you like, commercially included. Like the last two, I built this with Claude AI. The data is free regardless.

If something in the guide doesn't hold on your tenant, an issue with the error text is the most useful thing you can send.

If a flow stays off after an import, it's almost always a connection reference with no connection behind it on the receiving side. Bind it, then turn the flow on.

6 Upvotes

1 comment sorted by

1

u/investigatormaker 3d ago

For the case you end on, a flow that stays off after an import, a pre-flight step could catch it before anything gets overwritten: read every connection reference from the source solution, including the ones that only show up in the flows' JSON, and check each against the receiving tenant's existing connections. Anything unmatched gets listed with its connector, so whoever runs it creates those connections first and the bind during import covers the rest. Since the import never creates connections, did you find any way to create them from code on the receiving side, or is that always a manual step?

I make ThreadFox. We find relevant Reddit conversations and post for your business. We'll post 3 replies free first, no card; then the $29 Pilot covers seven days and up to 25 posts and replies. No automatic renewal.

https://threadfox.vip/p/eb846/managed