SOLVED
Home

Flow always running as Owner

%3CLINGO-SUB%20id%3D%22lingo-sub-392127%22%20slang%3D%22en-US%22%3EFlow%20always%20running%20as%20Owner%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-392127%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20created%20a%20flow%20running%20on%20a%20SharePoint%20Document%20library%2C%20it%20is%20triggered%20each%20time%20item%20properties%20are%20edited.%20Based%20on%20the%20value%20of%20some%20properties%2C%20the%20file%20is%20then%20converted%20to%20PDF%20and%20copied%20to%20another%20library.%20Pretty%20basic%20stuff.%20It%20works%20fine%2C%20but%20it%20always%20run%20as%20my%20user%2C%20and%20not%20as%20the%20user%20who%20triggered%20the%20flow.%20I%20would%20like%20it%20to%20run%20as%20the%20user%20who%20triggered%20the%20flow%20and%20use%20the%20credentials%20of%20that%20user%20to%20connect%20to%20SharePoint%20and%20OneDrive.%20It%20was%20my%20understanding%20that%20it%20was%20the%20default%20behavior%20of%20flow.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20can%20I%20create%20a%20flow%20or%20a%20connexion%20using%20the%20credentials%20of%20user%20triggering%20it%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%3C%2FP%3E%3CP%3EPierre-Nicolas%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-392127%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Flow%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOne%20Drive%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPDF%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-497509%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20always%20running%20as%20Owner%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-497509%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F289800%22%20target%3D%22_blank%22%3E%40pnparadis%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUnfortunately%20this%20is%20how%20Flow%20works.%26nbsp%3B%20It%20executes%20the%20actions%20as%20the%20person%20that%20created%20the%20connections.%26nbsp%3B%20Some%20actions%20like%20Approval%20now%20have%20options%20that%20let%20you%20tweak%20that.%26nbsp%3B%20Approvals%20let%20you%20set%20the%20Requestor%20for%20example%20so%20the%20emails%20show%20they%20are%20from%20that%20user.%26nbsp%3B%20But%20yes%2C%20if%20you%20are%20uploading%20files%20they%20show%20as%20that%20user%20instead.%26nbsp%3B%20You%20could%20always%20use%20a%20service%20account%20which%20is%20common%20when%20you%20send%20emails%2C%20and%20in%20these%20cases%20you%20create%20a%20shared%20mailbox%20and%20have%20your%20user%20sendas%20from%20the%20shared%20mailbox.%26nbsp%3B%20To%20my%20knowledge%20I%20also%20don't%20think%20its%20possible%20to%20change%20the%20CreatedBy%20or%20ModifiedBy%20in%20SharePoint%20Online.%26nbsp%3B%20Regardless%20if%20you%20are%20on-prem%20or%20Online%20you%20can%20change%20those%20fields%20with%20a%20PowerShell%20script.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-499121%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20always%20running%20as%20Owner%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-499121%22%20slang%3D%22en-US%22%3E%3CP%3EHey%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F5855%22%20target%3D%22_blank%22%3E%40Doug%20Allen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20for%20the%20answer%2C%20finally%2C%20i've%20changed%20the%20connection%20for%20the%20main%20user%20of%20the%20flow.%20It's%20not%20the%20best%2C%20but%20it%20works.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello, 

 

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? 

 

Thank you

Pierre-Nicolas 

2 Replies
Highlighted
Solution

@pnparadis,

 

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.  

Highlighted

Hey @Doug Allen 

 

Thank for the answer, finally, i've changed the connection for the main user of the flow. It's not the best, but it works.