Purpose of this is to be able to use SMTP to send mails and make it possible with Office 365 user even with MFA. During the proof of concept, I marked probably too many permissions. Feedback is welcome if someone else is using this kind of approach that which permissions.