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?
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:
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.