Create SMTP resource connected to Outlook via MS365

I am attempting to create the resource as per the title of this post.

I am using the following credentials:
Server name: smtp-mail.outlook.com
SMTP port: 587

along with a valid user name and password.

When testing the connection the following error is returned:

Test connection failed:Invalid login: Authentication unsuccessful, user is locked by your organization's security defaults policy. Contact your administrator.

The administrator and I have spent the last 90 minutes down the rabbit-hole. SMTP AUTH is enabled for the mailbox in question but we are in the dark as to what's next.

If you have traveled this path and emerged triumphant, please could you share your wisdom?

Many thanks...

Hey @patient_but_frustrated,

Have you tried using smtp.office365.com for the server name? I have a SMTP account successfully setup through O365/M365 and my connection settings are:
image

I dug a little more on the error you received, and I'm guessing the URL/Host won't fix it. There's a similar error posted on Microsoft's forum here:
https://answers.microsoft.com/en-us/msoffice/forum/all/sending-smtp-from-o365-tenant/cebfd355-ede6-4c3e-b420-a06e968ecafe

Reading through that, it could be that the user account you're using has restrictions in Azure AD (now called Entra ID), likely related to MFA and/or Legacy Auth. There's a couple solutions offered in that article that may help you complete the SMTP setup. Alternatively it suggests using MS Graph API to setup an application that allows sending emails with MFA/Legacy Auth enabled.

Thanks so much - now I'm connected its 'down to business'...