Trying to get nodemailer to work with Outlook and to send emails from the outlook email. I need the private key, access key, and the serviceClient, preferably that don't expire. And I see no way of getting those for Azure, for google it was simple enough, I just got the service account but the Azure doesn't have that option, only has client secret and certificates.
I need something like this
let transporter = nodemailer.createTransport({
host: 'Outlook365',
auth: {
type: 'OAuth2',
user: 'MYOUTLOOKEMAIL@DOMAIN.COM',
serviceClient: '113600000000000000000',
privateKey: '-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBg...',
accessToken: 'ya29.Xx_XX0xxxxx-xX0X0XxXXxXxXXXxX0x',
expires: 1484314697598
}
});
What is necessary to obtain service account like information from Microsoft/ Azure for my usecase? I probably have to register an app with them but I found no way of getting a service account. I need it for SERVER-TO-SERVER communication so no human interaction.