Run Dataverse row triggered flows in the context of the user

In this post, I’ll show you how to ensure Dataverse actions in your Dataverse row triggered flows, run in the context of the user who made the change initially in Dataverse as opposed to the user who owns the flow. A prerequisite To take… READ MORE [https://lewisdoes.dev/blog/run-dataverse-flows
photo of person running on dirt road
Photo by Orest Sv on Pexels.com
In: Low Code Lewis Content 🚀

In this post, I’ll show you how to ensure Dataverse actions in your Dataverse row triggered flows, run in the context of the user who made the change initially in Dataverse as opposed to the user who owns the flow.

A prerequisite

To take advantage of this functionality using the Dataverse connector in Power Automate, the owner of the flow created must have the Microsoft Dataverse privilege ‘Act on Behalf of Another User’ which is by default in the ‘Delegate’ security role but can be enabled in any security role.

https://learn.microsoft.com/en-us/powerapps/developer/common-data-service/impersonate-another-user

The trigger…

The trigger I’m focusing on here is the ‘when a row is added, modified or deleted’ trigger from the Dataverse connector. So this is, yes, not one that requires users to click a button to trigger our flow, and we can, yes, still run later actions using the Dataverse connector in the context of the user who initially made a change in Dataverse and caused our flow to run.

An option on our trigger

First, to be able to enable our actions to use the users connection (which can be the flow owner, row owner, or row modifier), then we need to specify this in our trigger.

So, on your trigger, select whether you want your actions to run as the flow owner, modifying user, or the row owner. Then we can allow our next actions to run in the context of this specified user.

Configuring the actions

Now on the Dataverse actions you want to run in the context of the user who caused the flow to trigger, click the three dots on them and select ‘use invoker’s connection’. This will cause the action to happen ‘on behalf of the user.’

And there you have it! It’s that simple. Now your Dataverse actions are running in the context of the user who caused your flow to trigger 🙂

I hope this post helped! If you need more help with something, let me know and I’ll add the topic to my list to write about

Written by
Lewis Baybutt
Microsoft Business Applications MVP • Power Platform Consultant • Blogger • Community Contributor • #CommunityRocks • #SharingIsCaring
Comments
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to LewisDoesDev.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.