Emails are not send when changing from O365 tenant

I changed with my mailbox from one O365 tenant to another 0365 tenant.
The account email address and password is the same but I always get the following error in my invoiceninja.log

[2023-03-17 16:07:49] production.INFO: error failed with Failed to authenticate on SMTP server with username “info@servitweb.be” using the following authenticators: “LOGIN”, “XOAUTH2”. Authenticator “LOGIN” returned “Expected response code “235” but got code “535”, with message “535 5.7.3 Authentication unsuccessful [AM0PR02CA0075.eurprd02.prod.outlook.com 2023-03-17T16:07:33.024Z 08DB26914934DDF9]”.”. Authenticator “XOAUTH2” returned “Expected response code “235” but got code “535”, with message “535 5.7.3 Authentication unsuccessful [AM0PR02CA0075.eurprd02.prod.outlook.com 2023-03-17T16:07:43.774Z 08DB26914934DDF9]”.”.
[2023-03-17 16:07:49] production.INFO: trying to send to info@servitweb.be 2023-03-17 16:07:49

How can I solve this? version is Using V5.5.89 because error when I go to 5.5.94

After upgrade to version v5.5.89 from v5.6 The error message is gone but I don’t receive any email and also no errors. So can not trace if this is working now yes or no.

When back to version v5.5.63 but still same issues

I think the issue is microsoft removing legacy authentication?

That can be the case. But also google already left lecagy authentication. everything is going to modern authentication. So how can we solve this?

I even tried to disable the modern authentication (which is not my preferred solution) but even then it still won’t work.

Solved the issue. Will update later what i did. I was something in azure ad

1 Like

Providing a default level of security in Azure Active Directory - Microsoft Entra | Microsoft Learn this setting solved my issue for now

1 Like