title: OAuth 2L to Microsoft Outlook account/ Azure? Service accounts in azure?
body: <p>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.</p>
  <p>I need something like this</p>
  <pre><code>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
      }
  });
  </code></pre>
  <p><a href="https://stackoverflow.com/questions/70143722/nodemailer-and-outlook-365-535-5-7-139-authentication-unsuccessful-not-meet-cri">This is the related question</a></p>
  <p>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.</p>