I've an unattended app used to send email with EWS protocol.
I've registered the app as described on https://blog.rebex.net/office365-ews-oauth-unattended and added the permission "Send mail as any user".
The smtpAddess used on _ews.Settings.Impersonation is "email@example.com"
The MailAddress on Sender and From of the Rebex.Mail.MailMessage is "firstname.lastname@example.org".
When I send the mail I get this error:
"The user account which was used to submit this request does not have the right to send mail on behalf of the specified sending account. Cannot submit message (ErrorSendAsDenied)."
Can you help me to found what is wrong?