cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

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
Dual Super User
Dual Super User

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
Dual Super User
Dual Super User

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

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?

Dual Super User
Dual Super User

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.

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
Dual Super User

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.

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,600)