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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Component Collection -...
Copilot Studio
Suggested Answer

Component Collection - Agent Flows Using Delegated Auth Fails to Write to Dataverse

(0) ShareShare
ReportReport
Posted on by 4
Hello all,
 
I have been experiencing issues with agent flows inside component collections when imported into a new environment.
 
I created an agent flow in my source environment, it functions as intended during testing using run-only user for delegated auth. I then created a component collection and added it to that, then exported the component collection and imported it into my target environment.
 
Once in my target environment, I added the component collection to a test agent. The test agent is able to invoke the flow but fails to authenticate, prompting me to use connection manager. In connection manager I am able to add a connection and it returns a green check for successful auth to the external system.
When I click Submit though I receive the following error: "User does not have sufficient permissions in Microsoft Dataverse for flow ''".
 
So it appears the issue that's occurring is related to whichever user is attempting to write the new connection record to Dataverse. I have been unable to find much information about this online.
 
Things to note:
  • The component collection otherwise functions as intended.
    • Topics work
    • If I set the flow to use a static connection instead of run-only user, the flow executes fine. But these flows are designed to be run using delegated auth so that will not work for this use case.
    • Connectors using delegated auth will even function correctly. From the component collection I had a topic that used the ADO "List Organizations" connector and the user was able to add a connection for that without issue, even though when the topic later invokes an agent flow also connecting to ADO using delegated auth, it throws this error when user attempts to add their connection.
  • I have tested this with both managed and unmanaged component collections, both seem to have this issue.
  • I tested importing an agent flow in it's own solution (no component collection), and that was able to create the connections without issue as well. This only appears to occur when the flow is in a component collection.
 
 
  • Sam_Fawzi Profile Picture
    1,150 Super User 2026 Season 1 on at
     
    Your isolation is good and it points at the cause. The error is Dataverse refusing to write the run-only user connection record, not the ADO auth failing, which is why you get a green check on the external system and then a failure on Submit.
     
    Two things to check first
    • Run-only user configuration does not survive solution export. This is the big one. Run-only user shares and the "Connections used" setting are runtime data on the flow record, not solution metadata, so they do not travel with the export. In your target environment, open the flow through Solution Explorer, not My flows, since solution flows shared with a user never appear under Shared with me. Check the run-only settings and confirm the ADO connection is set to Provided by run-only user rather than reverting to the owner's connection on import. Then add your users, or a Dataverse team, as run-only users explicitly in the target environment.
    • Processes table privileges. To write that record the user needs a security role with at least user-level privileges on the Processes table. Environment Maker is the built-in role that grants it. Basic User on its own does not. If your test user has only Basic User, that alone produces this error.
    If you are sharing with a group, note it has to go through a Dataverse team rather than an Entra security group directly. You can still back the team with an Entra group, but the team has to exist first.

    On the component collection difference
    I cannot comment for why the same flow works in a plain solution and fails inside a component collection. My read is that agents apply run-only sharing to flows in their own solution at publish time, and flows arriving via a component collection sit outside that scope so never get it. If your checks above come back clean, that is a bug rather than a configuration problem and worth a support ticket. Include exactly the comparison you made here, same flow, plain solution works, component collection fails, both managed and unmanaged, since that is what makes it actionable.
     
    Two questions
    Are you testing as yourself or as a separate non-maker user? Maker-level privileges will mask this.
    And what security role does the failing user hold in the target environment?
  • JS-02091818-0 Profile Picture
    4 on at
     
    Thank you for your speedy reply! There are two system created users listed in the run-only permissions settings. I had also previously noticed that in "My Flows" in the source environment, there was no other users listed as co-owners. In the target environment however, there was one of those users listed as a co-owner. The connections were set to run-only user though.
     
     
    I am the creator/owner of the flow in the source environment, the user that imported it, the owner of the agent that invokes it in the target environment, and the end-user trying to authenticate. I also possess System Administrator in both environments.
     
    The end-goal is to have component collections that can be dropped into environments as managed solutions that can then be used across multiple agents simultaneously. But for now, I'm the owner and the end-user.
  • Sam_Fawzi Profile Picture
    1,150 Super User 2026 Season 1 on at
     
    Fair warning up front: I have not hit this specific one myself, so treat the below as reasoning from how the pieces normally behave rather than something I have confirmed in production. Your isolation is good enough that it is worth working through regardless.
     
    First, disregard my Processes table point entirely. System Administrator in both environments rules that out. A sysadmin cannot be short of Dataverse privileges, which means the error message is misleading and something other than your identity is failing the write.
     
    Your ADO comparison is the sharpest detail in the whole thread. A connector-based topic in the same collection accepts a user connection, while an agent flow in that same collection does not. Those take different code paths. Connector connections bind at the agent level, whereas agent flow run-only connections write a record against the flow in Dataverse. So the fault sits specifically in the agent flow connection path under a component collection, not in component collections generally. Lead with that if this goes to support.
     
    Cheap things to try first, roughly in order of effort:
    1. Republish the agent. Adding a component collection does not always refresh tool connection bindings until a publish. Thirty seconds, and worth ruling out.
    2. Remove and re-add the component collection to the agent, then publish. Forces the agent to rebuild its tool registration for the flow.
    3. Turn the flow off and on in the target environment. Solution-imported flows can land with run-only configuration present but not fully committed. Toggling forces a rewrite of that state.
    4. Delete both run-only entries and add yourself explicitly, then save. Those two entries look like application users rather than people, and both show what appears to be the same truncated GUID. If they are stale references to principals that exist in source but not in target, the write may be failing on them rather than on you. This is the one I would try first if I had to pick one.
    5. Reassign the flow owner to yourself in the target environment. You noted a system user appeared as co-owner there but not in source, so ownership was changed by the import rather than by you.
    6. Isolate the import step. Export unmanaged, remove the flow from the collection, import, then add the flow back to the collection locally in the target environment. If a locally assembled collection works where an imported one does not, that separates the collection concept from the import process, which is useful either way.
    If none of that moves it, open a support ticket rather than continuing to guess. Before you do, grab the real error: F12, network tab, click Submit, and read the failing request's response body. Dataverse usually names the actual privilege and the identity it was evaluated against, which will tell you whether this is you, the agent's application user, or something the import created. Not a diagnostic step so much as what turns a two-week back and forth into a one-week one.
     
    Your repro is already complete, same flow works in a plain solution, fails in a component collection, both managed and unmanaged, reproducible as System Administrator. Given your end goal of reusable managed collections across multiple agents, this needs a real fix rather than a workaround.
  • JS-02091818-0 Profile Picture
    4 on at
    Thanks for getting back @Sam_Fawzi!
     
    Unfortunately it looks like the suggested solutions did not resolve the issue. And the network trace only exposes the same error shown in the screenshot, no further details which is a shame, can't track down which system user is attempting to write these records. I had suspected that perhaps it was attempting to write the record as a different user from myself, although it's unclear whether that user actually exists in the environment or the flow it's trying to write to has a different ID in the target environment. Do you know by chance which table in Dataverse these records would be written to? I haven't been able to match the flow id presented in the error with any values in Dataverse tables, even in the workflow table I cannot find it.
     
    I have a support case open in the mean time. Definitely curious if others on this forum have encountered the same, as I haven't been able to find much about this issue otherwise.
     
    Really appreciate the support!
  • Suggested answer
    Mohsin Ali Profile Picture
    1,075 on at
    Hello @JS-02091818-0 - Based on your testing, the key difference seems to be the Component Collection. The same agent flow works when imported separately, and static connections also work, but delegated/run-only authentication fails only when the flow is brought through the Component Collection.

    So my suspicion is that the imported collection may be retaining or creating a stale run-only/system-user reference, and the Dataverse operation is being attempted under that identity rather than your own account. It is also worth checking the connections associated with that user in the target environment.


    • Sign in to make.powerapps.com and select the target environment.

    • From the left navigation, open Connections.

    • Check whether there are duplicate or stale connections associated with the same user/agent.

    • If you find any suspicious or duplicate connections, remove them and then reauthenticate the agent/flow.

    I would also compare the run-only users and connection references between the source and target environments and recreate them in the target if needed.

    If the issue still persists after that, then opening a Microsoft support case is definitely the right direction, as this may point to a Component Collection deployment issue rather than a standard Dataverse permission problem.


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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Copilot Studio

#1
Mohsin Ali Profile Picture

Mohsin Ali 356

#2
Valantis Profile Picture

Valantis 253 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 179 Super User 2026 Season 2

Last 30 days Overall leaderboard