Hi @Tan , you can use MSAL for this: https://learn.microsoft.com/en-us/azure/active-directory-b2c/enable-authentication-in-node-web-app
This document does a good job detailing the process of achieving this.
Then you can use the Graph API to read and send emails through Outlook: https://efethegenius.medium.com/connect-and-fetch-emails-from-outlook-using-node-js-javascript-a-step-by-step-guide-f306a3b0a01b
Please let me know if you have any questions and I can help you further.
If this answer helps you please mark "Accept Answer" so other users can reference it.
Thank you,
James