WPManageNinja / fluent-smtp

FluentSMTP - WordPress SMTP & Email Service API connection Plugin
https://fluentsmtp.com
86 stars 44 forks source link

Microsoft 365 Connection Failing With Multiple Websites #218

Open gahlm opened 2 months ago

gahlm commented 2 months ago

Around July 5th emails started failing on multiple sites I work with using the Office 365 connection. Reconnected with new client ID and secret from 365 and still no luck. Just getting the following on every test email:

{ "code": 422, "message": "Unauthorized", "errors": [ "Unauthorized" ] }

tfrank77 commented 2 months ago

I just wanted to set up a new Microsoft connection and got the same error, today. I did this previously on a few websites and never had any problems.

Any thoughts?

JorgenWoortman commented 1 month ago

Having the same issue. Followed the documentation to the letter, but am also missing remarks in the documentation about the settings that were not set, but are looking relevant.

Third, I'd like to know if I need to make a connector in Exchange Online for the website to allow email relay.

Thanks in advance for clarification.

sburak58 commented 3 weeks ago

I'm having the same issue. Here is how it appears for me when I sent a Test Email. I also followed the instructions precisely. Thanks in advance for the help. Screenshot 2024-08-19 215316

JorgenWoortman commented 3 weeks ago

I have learned that the (global?) admin account that makes the app registration, also needs a valid mailbox/license to set up fluent smtp.

After setting the regiatration and the Entra ID permissions to the registered SPN, fluent should work.

I am still to confirm this, but with a different customer this was the solution. Unfortunately, this requirement is nowhere to be found in the Fluent documentation.

Looking forward to your test result.

Verzonden vanaf Outlook voor Androidhttps://aka.ms/AAb9ysg


From: sburak58 @.> Sent: Tuesday, August 20, 2024 5:57:19 AM To: WPManageNinja/fluent-smtp @.> Cc: JorgenWoortman @.>; Comment @.> Subject: Re: [WPManageNinja/fluent-smtp] Microsoft 365 Connection Failing With Multiple Websites (Issue #218)

I'm having the same issue. Here is how it appears for me when I sent a Test Email. I also followed the instructions precisely. Thanks in advance for the help. Screenshot.2024-08-19.215316.png (view on web)https://github.com/user-attachments/assets/5880df2f-5994-4b03-aeae-aaa09930efef

— Reply to this email directly, view it on GitHubhttps://github.com/WPManageNinja/fluent-smtp/issues/218#issuecomment-2297915577, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVH7IQ462BZXVOAWRMAAI2TZSK5B7AVCNFSM6AAAAABKZUYFACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJXHEYTKNJXG4. You are receiving this because you commented.Message ID: @.***>

tfrank77 commented 3 weeks ago

The only way I can solve the "Unauthorized" error is when I use the Microsoft account email address in the "from email" field. Unfortunately, I can't use a different mail address with the same domain. I hope it helps.