I want to trigger a Flow from Power Apps on select of a button that sends emails. Regardless of the user who performed the on select action, I want to send the email from a shared account using the Send an email (V2) action.
The flow is owned by a service account. The shared account is in the From (Send as) line. When I test within the Flow, it works fine. When I test within Power Apps as a user who is not the service account, the Flow fails (You are not authorized to send mail on behalf of the specified sending account).
The connection for Send an email is using the service account Office 365 Outlook connection. I thought that as long as the connection performing the Send Email action has Send as/send on behalf of permission, the email could send from the shared account. I do not want to give all users using the app send on behalf of permission from the shared account, only for app purposes. Am I wrong on how these permissions work?
EDIT: it seems that the main issue is the fact that the flow is triggered from Power Apps. I can use send on behalf of as expected when the flow is triggered from something like When an item is added to a list, regardless of who performs the action of adding the item. The update of sending from this shared account is new request and there are about 30 places in my app where emails are sent on a button click so I don't really want to change the trigger at this point. Does anyone know if it's possible to force the send action to be run by the owner of the Flow so send on behalf of works rather than the person performing the action?
You should add new shared mailbox from admin https://admin.microsoft.com/#/homepage center here
you should create NEW EMAIL, as already creted mailbox will not works!!!
then you can use Send an email from shared mailbox (v2)
And now current user will get email from shared mailbox address (not from themselves), but you should set permission to each
Hey @Cooper01 , I'm glad I was able to share some useful info. If it helped you, please mark it as resolved so this thread can help others.
Have a great one!
Thanks for the response and explanation @edguerre. I changed my Flow trigger so instead of the button OnSelect action triggering the Flow directly, it adds a recipient, subject, and body as separate fields on a SharePoint list. The Flow triggers now on When an item is added to the list and passes those three values into the respective Send an email action properties. Annoying to redo it all on the Power Apps side but at least I'll know for next time!
Unfortunately I don't think that is possible. First, as you know, the user running the app would always have to have access to the shared account that they are sending emails on behalf of - this is mandatory.
About user X running the flow using the connection from user Y, that would be multiplexing and that has been removed for a long time. Otherwise, it would be possible to have N users running one app and using premium connections, while only having one account! So I'm afraid all users need to have access to the shared account..
I hope this explains things.
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1