Cannot send email from passbolt docker to microsift office 356 outlook (smtp.office365.com:587))

Docker container is setup on Azure VM (Ubantu) and email configuration has been setup as following in docker-composer file as followins,

EMAIL_DEFAULT_FROM=noReply@localhost
EMAIL_DEFAULT_TRANSPORT=Smtp
EMAIL_TRANSPORT_DEFAULT_HOST=smtp.office365.com
EMAIL_TRANSPORT_DEFAULT_PORT=587
EMAIL_TRANSPORT_DEFAULT_TIMEOUT=30
EMAIL_TRANSPORT_DEFAULT_USERNAME=xxxxxx@xxx.onsys.com.au
EMAIL_TRANSPORT_DEFAULT_PASSWORD=xxxxxxx
EMAIL_TRANSPORT_DEFAULT_CLIENT=null
EMAIL_TRANSPORT_DEFAULT_TLS=true
EMAIL_TRANSPORT_DEFAULT_URL=null

error,

“cmd”: “AUTH LOGIN”,
“response”: [
{
“code”: “504”,
“message”: “5.7.4 Unrecognized authentication type [SYBPR01CA0128.ausprd01.prod.outlook.com 2023-06-26T11:38:25.003Z 08DB755D85D55973]”
}

Any fix or comments please?

Tried smtp-legacy.office.com and it did now shaw similar error, but email did not receive as expected.

"cmd": "AUTH LOGIN",
    "response": [
        {
            "code": "334",
            "message": "VXNlcm5hbWU6"
        }
    ]
},
{
    "cmd": "amVld2FuYUBzdXBwb3J0Lm9uc3lzLmNvbS5hdQ==",
    "response": [
        {
            "code": "334",
            "message": "UGFzc3dvcmQ6"
        }
    ]
}

]

Does the account you are using to connect to o365 have MFA set up on it? If so you’ll need an app password to use here