Hi All,
Just to share after following the documentation to connect to Microsoft 365, I was getting errors when attempting to test the connection. https://www.odoo.com/documentation/18.0/applications/general/email_communication/azure_oauth.html
I worked out that SMTP Auth is generally disabled by default in the Microsoft 365 Tenant. You either need to enable it tenant wide, or on a per-user basis (preferred option).
There are various ways to enable this (via the GUI or script).
Below is via the GUI per user:
- In Microsoft Admin Center
- Go to Users > Active Users > Select the applicable user
- In the Window on the right > Choose Mail > Manage email Apps
- Ensure "Authenticated SMTP" is selected.
- Test!
Hope this saves someone unnecessary hair pulling! (and maybe it could be added to the documentation)
EDIT: I've got screenshots but as a fresh user, I'm not allowed to post the images. Sorry.