cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate III
Advocate III

File System Connector behaves differently depending on Trigger

We have a Flow that runs on a SharePoint list. It uses a File System connector and a gateway to create a file on a network share.

The data is submitted to the list from a Power Apps application. Due to the polling delay on the Flow (i.e., sometimes it is up to 5 minutes after data has been submitted for the Flow to run) we are trying to run the Flow directly from the app instead.

However, when we create a version of the Flow that is called from Power Apps, users are prompted to each create their own File System connector. This not what we went - we want to have the app use the same connector in the Flow for all users (like it does when running from the SharePoint List).

Is there any way to prevent this? If each user must have her own connector, is there a way we can pre-define it for each user, so she isn't prompted to create a new connector?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User II
Dual Super User II

Re: File System Connector behaves differently depending on Trigger

That behavior is by design.  When you create a Flow that runs with an automated trigger then the Flow runs in the security context of the original maker.  But when you create a Flow with a manual trigger, like a Power App button, then the Flow runs in the context of the user.  That's why they are getting prompted to setup the connection.  There is some PowerShell that will setup the connection in the background when a user runs the app without prompting them.  But it still creates the separate connection in their context.  There is no way to avoid that.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

6 REPLIES 6
Highlighted
Dual Super User II
Dual Super User II

Re: File System Connector behaves differently depending on Trigger

That behavior is by design.  When you create a Flow that runs with an automated trigger then the Flow runs in the security context of the original maker.  But when you create a Flow with a manual trigger, like a Power App button, then the Flow runs in the context of the user.  That's why they are getting prompted to setup the connection.  There is some PowerShell that will setup the connection in the background when a user runs the app without prompting them.  But it still creates the separate connection in their context.  There is no way to avoid that.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Highlighted
Advocate III
Advocate III

Re: File System Connector behaves differently depending on Trigger

Thank you for the super-speedy reply - this is sort of what we were guessing at, but it is helpful to have confirmation. Any clues on where I might find a sample of the PowerShell script you've mentioned?

Highlighted
Dual Super User II
Dual Super User II

Re: File System Connector behaves differently depending on Trigger

Actually, I've been looking for it and can't seem to lay my hands on the documentation for it.  I'll keep looking.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Advocate III
Advocate III

Re: File System Connector behaves differently depending on Trigger

Thanks - I found this:

https://powerapps.microsoft.com/en-us/blog/gdpr-admin-powershell-cmdlets/

But it only has read & delete for connectors, nothing for creating.

Highlighted
Dual Super User II
Dual Super User II

Re: File System Connector behaves differently depending on Trigger

This is the one I was talking about.  

Set-AdminPowerAppApisToBypassConsent

 

https://www.o365dude.com/2019/01/06/bypass-consent-pop-ups-in-powerapps/



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Advocate III
Advocate III

Re: File System Connector behaves differently depending on Trigger

Thank you - we'll test and see what happens to our Flow if this is done for the app in question. 

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (5,620)