Unable to login through SMTP AUTH on Office365 port 587

Hello,

I am trying to connect a python script to an account, but till now, I am only receiving this response from server side:

smtplib.SMTPAuthenticationError: (535, ‘5.7.3 Authentication unsuccessful [CH2PR16CA0021.namprd16.prod.outlook.com]’)

With this script in python 2.7:

import smtplib

SERVER = "smtp.office365.com"
PORT = 587

PASS = ""
FROM = ""
TO = ""
MSG = "testing..."

server = smtplib.SMTP(SERVER, PORT, timeout=20)
server.ehlo()
server.starttls()
server.login(FROM, PASS)
server.sendmail(FROM, TO, MSG)
server.quit()

From Admin console at office 365, Enable Security defaults are disabled, and from user account, SMTP AUTH is enabled.

With a verbose mode I got:

[x@web619 USER1]$ python emailtest.py
send: 'ehlo web619.webfaction.com\r\n'
reply: '250-CH2PR15CA0015.outlook.office365.com Hello [2605:de00:1:1:4a:56:0:2]\r\n'
reply: '250-SIZE 157286400\r\n'
reply: '250-PIPELINING\r\n'
reply: '250-DSN\r\n'
reply: '250-ENHANCEDSTATUSCODES\r\n'
reply: '250-STARTTLS\r\n'
reply: '250-8BITMIME\r\n'
reply: '250-BINARYMIME\r\n'
reply: '250-CHUNKING\r\n'
reply: '250 SMTPUTF8\r\n'
reply: retcode (250); Msg: CH2PR15CA0015.outlook.office365.com Hello [2605:de00:1:1:4a:56:0:2]
SIZE 157286400
PIPELINING
DSN
ENHANCEDSTATUSCODES
STARTTLS
8BITMIME
BINARYMIME
CHUNKING
SMTPUTF8
send: 'STARTTLS\r\n'
reply: '220 2.0.0 SMTP server ready\r\n'
reply: retcode (220); Msg: 2.0.0 SMTP server ready
send: 'ehlo web619.webfaction.com\r\n'
reply: '250-CH2PR15CA0015.outlook.office365.com Hello [2605:de00:1:1:4a:56:0:2]\r\n'
reply: '250-SIZE 157286400\r\n'
reply: '250-PIPELINING\r\n'
reply: '250-DSN\r\n'
reply: '250-ENHANCEDSTATUSCODES\r\n'
reply: '250-AUTH LOGIN XOAUTH2\r\n'
reply: '250-8BITMIME\r\n'
reply: '250-BINARYMIME\r\n'
reply: '250-CHUNKING\r\n'
reply: '250 SMTPUTF8\r\n'
reply: retcode (250); Msg: CH2PR15CA0015.outlook.office365.com Hello [2605:de00:1:1:4a:56:0:2]
SIZE 157286400
PIPELINING
DSN
ENHANCEDSTATUSCODES
AUTH LOGIN XOAUTH2
8BITMIME
BINARYMIME
CHUNKING
SMTPUTF8
send: 'AUTH LOGIN XXXXXXXXXXXXXXXXXXXXXXXX=\r\n'
reply: '334 UGFzc3dvcmQ6\r\n'
reply: retcode (334); Msg: UGFzc3dvcmQ6
send: 'XXXXXXXXXXXXX==\r\n'
reply: '535 5.7.3 Authentication unsuccessful [CH2PR15CA0015.namprd15.prod.outlook.com]\r\n'
reply: retcode (535); Msg: 5.7.3 Authentication unsuccessful [CH2PR15CA0015.namprd15.prod.outlook.com]
Traceback (most recent call last):
  File "emailtest.py", line 22, in <module>
    server.login(FROM, PASS)
  File "/usr/lib64/python2.7/smtplib.py", line 621, in login
    raise SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (535, '5.7.3 Authentication unsuccessful [CH2PR15CA0015.namprd15.prod.outlook.com]'

Seems to be an AUTH LOGIN issue, because I am not using any oauth2 lib in that script, but I am not sure if its just that or even that, and I think that smtplib uses AUTH LOGIN PLAIN by default.

And I dont know if there is a way from Office365 side to allow AUTH LOGIN PLAIN for this particular remote machine on a shared server.

Anyone knows?