cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Attaching a flow to a Power App fails when the flow contains an Outlook 365 email action

Attaching a flow to a Power App fails when the flow contains an Outlook 365 email action.  The error received is "Failed during http send request."  This occurs when the credentials used when the email action was added to the flow are different from the credentials of the user who is editing the Power Apps.  Example, User A is editing the Power App and is trying to attach a flow that was created by User B.  The email action in the Flow is using User B's credentials.  The Power App and the Flow are shared to User A and User B as co-owners.  The only way to get the flow attached to the power app is if User B opens the app for editing and attaches the Flow.  User A can't attach the Flow.

4 REPLIES 4
Highlighted
Dual Super User II
Dual Super User II

Re: Attaching a flow to a Power App fails when the flow contains an Outlook 365 email action

Hi @revans 

 

Interesting scenario. 

One quick step could be the user who has the flow created to save it as a template.

The user who will be attaching the flow to the App can then leverage the template and rebuild the flow - thereby all connections would be under their account.

 

Also, please note when a Power App calls a flow all the connections in the flow run under the context of the user running the Power App.

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Highlighted
Dual Super User III
Dual Super User III

Re: Attaching a flow to a Power App fails when the flow contains an Outlook 365 email action

The problem is that when you trigger a flow manually using a Power App the flow will then run in the context of the user running the Power App.  So when you attach your flow to the Power App it tries to run the Send an Email action in User A's context, not User B's context.  If User A doesn't have the authority to send the email it will fail.  That's the way Power Apps and Power Automate are designed to work.  You have to make sure that User A can create a connection to do all the actions required in the flow or it won't work.



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

Re: Attaching a flow to a Power App fails when the flow contains an Outlook 365 email action

Hi,

 

As Pstork said, if User A doesn't ave permission the flow will fail. You could also set up send as permissions for each user who would run this flow, but each user would have to be set up individually so depending on how many users would have access this might not be preferable.

 

Regards,

 

Alex

 

-------

 

Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Frequent Visitor

Re: Attaching a flow to a Power App fails when the flow contains an Outlook 365 email action

In our scenario, the user simply needs to have permission to send an email via Outlook 365.  All our developers have this permission.  If User A creates the Flow and attaches the Flow to the Power App, User B is able to run that app because (as was mentioned in the replies) the Flow runs under the credentials of the user. 

 

Given this, then why can't User B attach the same Flow (created by User A) to a Power App that User B owns when both the App and the Flow are shared? This same issue doesn't exist for other types of connectors such as SQL and CDS.

 

Seems like a bug with the Outlook 365 connector since it applies this restriction when other connectors don't.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,075)