Hi all,
Within a PowerApp, if you connect to a PowerAutomate flow to send an email; the email send action in the flow seems to run as the user logged in to the PowerApp.
Is that correct?
For example:
If I test this PowerAutomate flow from within PowerAutomate, it works correctly - I'm guessing it's using the account set on the Outlook Send Email action to send the email.
If I use the PowerApp (logged on as a different user who doesn't have SendAs access for the mailbox set in the flow), pressing the button that calls the PowerAutomate flow, it fails with an error "no permission" - which leads me to think that the Outlook Send Email action is connecting as the PowerApp user rather than the user set explicitly on the Outlook Send Email action in the flow.
Is this how it is supposed to work?
Cheers,
Steve.
Reply from @RandyHayes as below...
This is correct. When you call a PowerAutomate Flow from PowerApps, it executes under the context of the User using the app.
If you need to utilize a send as from a shared mailbox account, then either the users of that will need send on behalf permissions or they will fail in the flow.
You can also offset this by, instead of sending the email in the flow, writing a record to a secondary SharePoint list with any relevant information (email body, to addresses, etc) and then have a separate flow set up to trigger on the creation of a new item in SharePoint for that secondary list. That can then have its account set to have send on behalf permission and then it can grab the record and build the email. Those triggered flows execute in the context of the creator of the flow.
I hope this is helpful for you.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
8 | |
5 | |
4 | |
3 | |
3 |