Replies: 5 comments
-
I also asked a question to the azure community: |
Beta Was this translation helpful? Give feedback.
-
It might help if you post the proxy's log in debug mode so that I can see what authentication method is actually being attempted. |
Beta Was this translation helpful? Give feedback.
-
I actually have exactly same problem, also from the instructions how can I configure my "account" - that is Azure app registrations (with app id & secret (I didn't test the certificate)) to send email as my email (the app has permissions to send as my mailbox). it does work if I do:
With the obtained token, I can successfully send an email using the Microsoft Graph API:
This approach works perfectly. when I do:
I get the following log:
Is there an option not to use username and password?
logs for when I don't pass the username and password:
Here's my config:
|
Beta Was this translation helpful? Give feedback.
-
Did you find a solution to this? I'm having the same issue |
Beta Was this translation helpful? Give feedback.
-
Given the various errors that are being received in the logs posted here, this is an issue with the configuration of the OAuth client on the Azure/Entra side, rather than an issue with the proxy. @depawlur re: username/password – there is not an option to skip the username/password – this is an essential part of the process. In the log where you do include the username and password, this is being handled by the proxy, and the OAuth token is being sent instead on your behalf (the line containing I'd recommend ensuring that SMTP AUTH is enabled, and looking at the response to the question @giuseppCl posted on the Azure community |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have set up an Azure App Registration to send emails using Microsoft services via the client_credentials flow. I am utilizing this application for this purpose.
Working Workflow with Microsoft Graph API:
I request a token using the following command
With the obtained token, I can successfully send an email using the Microsoft Graph API:
This approach works perfectly.
Problem with SMTP and Scope https://outlook.office365.com/.default:
However, when I use the scope https://outlook.office365.com/.default to send emails via SMTP (smtp-mail.outlook.com), authentication fails. The server and configuration used are as follows:
Despite correct credentials and using the same Azure App Registration, I receive the following error when attempting to send emails:
535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully.
I have also followed these steps using PowerShell:
New-ServicePrincipal -AppId "APP_ID" -ServiceId "OBJECT_ID"
Set-ServicePrincipal -Identity "OBJECT_ID" -DisplayName "email-oauth-proxy"
Add-MailboxPermission -Identity "SENDER_EMAIL" -User "OBJECT_ID" -AccessRights FullAccess
Despite these steps, the issue with SMTP authentication persists.
This is my emailproxy.config
Im using the dockerzied setup:
Does anyone know what I am doing wrong? Or does anyone have any tips or guesses for further debugging?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions