web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Office365Outlook.SendE...
Power Apps
Unanswered

Office365Outlook.SendEmailV2 From Error: 403

(0) ShareShare
ReportReport
Posted on by 54

Hi,

I used the Office365Outlook data source in PowerApps to send out an email notification based on fields and buttons clicked within a canvas app. I get an error from some individuals, and for some it pushes through correctly.

 

The code I used is something like this.

 

Office365Outlook.SendEmailV2("Email Address Here", "Subject Title Here", "Email Body Here")

 

For some resources, this sends out correctly using their account. However, for one resource, the email account sends using a shared mailbox.

 

I'm thinking it needs to specify which account, and so I tried using "From" inside the code. It looks like this. "varUser.Email" is a variable holding the current user's email.

Office365Outlook.SendEmailV2("Email Address Here", "Subject Title Here", "Email Body Here", {From: varUser.Email})

Again, this works for most users. However, for some, PowerApps returns an error message:

Office365Outlook.SEndEmailV2 failed: {"status":403, "message": "You are not authorized to send mail on behalf of the specified sending account" [...] code: "ErrorSendAsDenied"

 

Is there anything I'm missing? Or anything I should check out? Thank you. Any help is appreciated

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,049 Most Valuable Professional on at

    Hi @noelflores ,

    I have to ask one question here - why are you bothering with From when you are using the user's email - the mail will always come from the logged-in user (their connection is used when they open the app). How are you specifying the Shared Mail Box?

  • One Profile Picture
    416 on at

    hi @noelflores,

    I agree with @WarrenBelz, it would make sense to use From if you wanted the notification to come from something like a department email rather than an employees work email. however, you will need to make sure people have the proper permissions to access that email group if using this method. otherwise the better route would be to let PowerApps default to the currently logged in user's email. it is automatically used by the Outlook connecter if no From is provided.

  • nwelflores Profile Picture
    54 on at

    Hi, I'm actually not specifying a shared mailbox. I used From in response to the first scenario, where on some resources, the email is sent out using a shared mailbox. I wanted to see if I forced the From property, if the app is going to use the logged-in connection instead. 

     

    First Scenario. without From : the result is that email sends out using a shared mailbox,
    Second Scenario, with From : "error message 403"

     

    My hunch is that it is bypassing the logged-in connection and using the user's associated mailbox for some reason.

     

     

     

     

  • One Profile Picture
    416 on at

    @noelflores,

    that is why he was asking why you were using From in the first place because the outlook connector will default to the current users email so you shouldn't need to provide a From unless you wanted it to come from something like a shared mailbox. but he was also pointing out that you are creating another separate variable to hold the email when you could just use the following to provide the current users Email:

    User().Email

    {"status":403, "message": "You are not authorized to send mail on behalf of the specified sending account" - This just means that the app tried to send an email from an account the current user doesn't have permission to use. For the first scenario where the email is sending from a shared mailbox, if the user commonly uses the shared mailbox they may have the shared mailbox as their default sender in Outlook. I am not sure if PowerApps is able to overwrite this or not, but it would explain why the emails are being sent from a shared mailbox.

    ------------------------------------------------------------------------------------------------------------------------------
    Please click "Accept as Solution" if this post answered your question so that it is helpful for people having similar questions. If you found this post helpful smack that Thumbs up button! Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard