I've created a flow running on a SharePoint Document library, it is triggered each time item properties are edited. Based on the value of some properties, the file is then converted to PDF and copied to another library. Pretty basic stuff. It works fine, but it always run as my user, and not as the user who triggered the flow. I would like it to run as the user who triggered the flow and use the credentials of that user to connect to SharePoint and OneDrive. It was my understanding that it was the default behavior of flow.
How can I create a flow or a connexion using the credentials of user triggering it?
Unfortunately this is how Flow works. It executes the actions as the person that created the connections. Some actions like Approval now have options that let you tweak that. Approvals let you set the Requestor for example so the emails show they are from that user. But yes, if you are uploading files they show as that user instead. You could always use a service account which is common when you send emails, and in these cases you create a shared mailbox and have your user sendas from the shared mailbox. To my knowledge I also don't think its possible to change the CreatedBy or ModifiedBy in SharePoint Online. Regardless if you are on-prem or Online you can change those fields with a PowerShell script.
Best Response confirmed by
pnparadis (Occasional Contributor)