Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outlook basic authentication with app password is deprecated #1217

Open
bwirt opened this issue Oct 4, 2024 · 4 comments
Open

Outlook basic authentication with app password is deprecated #1217

bwirt opened this issue Oct 4, 2024 · 4 comments
Labels

Comments

@bwirt
Copy link

bwirt commented Oct 4, 2024

📣 Notification Service(s) Impacted
Outlook.com email

🐞 Describe the bug
Calls to /notify fail for email notifications using Outlook.com accounts. It appears Microsoft has disabled basic authentication and now requires oauth2.

💡 Screenshots and Logs
Response from POST notify/myconfig results in 424:

{
  "error": "One or more notification could not be sent",
  "details": [
    [
      "INFO",
      "2024-10-04 10:33:01,243",
      "Loaded 2 entries from memory://"
    ],
    [
      "INFO",
      "2024-10-04 10:33:01,243",
      "Notifying 2 service(s) with threads."
    ],
    [
      "WARNING",
      "2024-10-04 10:33:06,994",
      "Connection error while submitting email to smtp.outlook.com. Reason: (535, b'5.7.139 Authentication unsuccessful, basic authentication is disabled. [MW4PR04CA0237.namprd04.prod.outlook.com 2024-10-04T15:33:06.965Z 08DCE442F5AF553A]')"
    ],
    [
      "INFO",
      "2024-10-04 10:33:07,625",
      "Sent 1 Signal API notification to +12065551212."
    ]
  ]
}

My configuration:

signal=signal://signal-api.my.org/+12065551212/?batch=no&status=no&format=text&overflow=upstream&rto=30&cto=4.0&verify=yes
outlook=mailtos://outlook.com?smtp=smtp.outlook.com&[email protected]&pass=myAppPassword&from=Me<[email protected]>

# groups
email=outlook
messenger=signal

💻 Your System Details:
Docker container on Ubuntu

🔮 Additional context
This was working until a day or two ago. Updated my app password and still doesn't work. Others online appear to be having this issue as well.

https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/deprecation-of-basic-authentication-exchange-online#pop-imap-and-smtp-auth

@bwirt bwirt added the bug label Oct 4, 2024
@caronc
Copy link
Owner

caronc commented Oct 4, 2024

Thank you for reporting this! 🙏

@caronc
Copy link
Owner

caronc commented Oct 4, 2024

Having sat down and looked at it, it occured to me that the solution is already in place, have you looked at this which leverages the Oauth2 recommended alternative.

Although open issues #836 and #858 may identify that this solution may be lacking documentation and still require further investigation.

@Austenite2
Copy link

Having sat down and looked at it, it occured to me that the solution is already in place, have you looked at this which leverages the Oauth2 recommended alternative.

Doesn't that require Azure tenants? I am just trying to use Moonraker to send an email to my outlook.com account, I can't see how that Oauth solution helps in my case. (Thanks for your great work!)

For completenes, in moonraker.conf:
[notifier email] url: mailtos://outlook.com?smtp=smtp-mail.outlook.com&from=Voron<[email protected]>&[email protected]&pass=mypass events: complete, error, paused body: "Your printer status has changed to {event_name}" title: "Your printer status has changed to {event_name}"

Moonraker log:
2024-10-04 10:29:38,465 [klippy_apis.py:pause_print()] - Requesting job pause... 2024-10-04 10:29:39,059 [apprise.py:_notify_parallel_asyncio()] - Notifying 1 service(s) asynchronously. 2024-10-04 10:29:47,633 [email.py:submit()] - Connection error while submitting email to smtp-mail.outlook.com. Reason: (535, b'5.7.139 Authentication unsuccessful, basic authentication is disabled. [SY5P282CA0093.AUSP282.PROD.OUTLOOK.COM 2024-10-04T09:29:47.619Z 08DCE39B196D8EF9]')

This also used to work until recently.

@caronc
Copy link
Owner

caronc commented Oct 4, 2024

Microsoft doesn't always make things easy. 😉 All of their platforms are very tightly woven together. You need to use Azure because it opens the door to use the API (which in turn can talk back to you Outlook instance.

It doesn't cost you anything; in this case, you're only using it as a portal to generate your OAuth2 setup (not virtual machines or other costly tools)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants