cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lliu_western
Resolver II
Resolver II

Sending an e-mail notification through service account

Hi I created a Flow that sends out e-mail notifications.

 

But I need the e-mail to be sent out from the Service Account. 

 

I tried using the under the advance options --> From (Send As) , however, this one causes the flow to fail with error message of "You are not authorized to send mail on behalf of the specified sending account."

 

I have also saw a method of using Delegation Group so changing the D365 setting of that e-mail account. 

 

Does anyone have any simpler way, tips to achieve this goal? 

1 ACCEPTED SOLUTION

Accepted Solutions
lliu_western
Resolver II
Resolver II

Answering my own question here.

 

Background story I missed earlier. 

 

I have a PowerApps, and whenever a user perform certain actions, it requires the App to send out an e-mail notification to target audience. 

 

I tried using the outlook connectors in PowerApps, however, it will always uses the credential of the user that is using PowerApps.

 

I tried to build a flow to send out the e-mail notification and the start of the Flow is a trigger by PowerApps. The result of it is the same. The e-mail still sends out from the user the is using the PowerApps

 

I found a way around to achieve the goal of sending through a service account. I used SharePoint, "when an item is created" as the Flow trigger. 

 

And in PowerApps, in the case where I need PowerApps to trigger an e-mail notification to be sent out through the service account, I do a patch statement to that SharePoint list so it creates an new item that triggers the Flow. 

View solution in original post

2 REPLIES 2
Pstork1
Dual Super User
Dual Super User

To send out an Email from a Flow as another user you must have "Send As" permission to their mailbox.  So if you want to use a service account for this you need to do three things.

 

1) Make sure the flow is running under your security context.  Automatically triggered flows run in the context of the maker.  Manually triggered flows run based on whoever starts them. 

2) Make sure the service account has a mailbox they can send mail from

3) Make sure you have "Send As" permission to that mailbox.

 

Another alternative would be to make sure the service account has a mailbox and a Power Automate license and build the flow using that account.  Then the email will come from that account, again if the flow is triggered automatically.



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

Join me at 365EduCon in Chicago on Sept. 26-30 where I'll be presenting on the Power Platform!
lliu_western
Resolver II
Resolver II

Answering my own question here.

 

Background story I missed earlier. 

 

I have a PowerApps, and whenever a user perform certain actions, it requires the App to send out an e-mail notification to target audience. 

 

I tried using the outlook connectors in PowerApps, however, it will always uses the credential of the user that is using PowerApps.

 

I tried to build a flow to send out the e-mail notification and the start of the Flow is a trigger by PowerApps. The result of it is the same. The e-mail still sends out from the user the is using the PowerApps

 

I found a way around to achieve the goal of sending through a service account. I used SharePoint, "when an item is created" as the Flow trigger. 

 

And in PowerApps, in the case where I need PowerApps to trigger an e-mail notification to be sent out through the service account, I do a patch statement to that SharePoint list so it creates an new item that triggers the Flow. 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (5,190)