Sending email using outlook account

I would like to send emails using outlook account used internally within companies. I am trying to achieve the same using node.js (express js). After googling a lot, I came to the code :

  nodemailer.createTransport("SMTP",{
 host: "smtp-mail.outlook.com",
  secureConnection: false, // TLS requires secureConnection to be false
  port: 587, // port for secure SMTP
 auth: {
   user: config.emailUsername,
   pass: config.emailPassword
},
 tls: {
    ciphers:'SSLv3'
 }  
});

Now, the error that I get is authentication error. I login to outlook using username provided to me from my company (which is my employee Id). Is the approach correct to send email using the same account?