User impersonation in Power Automate flow
Elvis impersonation from gifer.com

User impersonation in Power Automate flow

In the Dataverse connector triggers and actions in Power Automate cloud flow I like using the user impersonation feature. With this feature you act as the user that triggered the flow. This is very useful if you need to act in the context and privileges of that user. If you created classic workflows in Dynamics 365 you probably are familiar with this concept. There it is known as the feature Execute as user.

Ingen alternativ tekst tilgjengelig for dette bildet

?User impersonation in Power Automate is a two-step process. In the first step you need to show the advanced options in the Dataverse trigger and choose Run as: Modifying user. You could also choose Row owner if you need to act as the user that’s owner of the record concerned. You must have the Microsoft Dataverse privilege Act on Behalf of Another User (prvActOnBehalfOfAnotherUser). The Delegate and System Administrator security role includes this privilege by default. You can enable it on any security role. Additionally, you could change the scope of the flow to take the user’s privileges into account.

Ingen alternativ tekst tilgjengelig for dette bildet

For the second step you need to create an action for the Dataverse connector. In this action you open the meny by clicking on the ellipsis in the top right corner of the action. In the side menu check Use invoker’s connection. All the Dataverse actions in this flow now use invoker’s connection and this can be set back to the default in each individual action. The changed will be registered on the user that triggered the flow and shown as such on the audit log. If that user doesn’t have the privilege in Dataverse to perform the action, the action won’t succeed. In some cases this is a good thing. ??

Ingen alternativ tekst tilgjengelig for dette bildet
Freddy K. Elvenes

Sales and consulting professional

2 年

Keep up the good work Timothy, and keep'em coming

要查看或添加评论,请登录

Timothy Bohte的更多文章

社区洞察

其他会员也浏览了