Hi I've tried multiple options but still falls back to the error 'smtpclientauthentication' is disabled for this tenant. ... please visit .../smtp_auth_disabled...
But when I spoke to the IT, they told me Microsoft is ending this later 2025.
So I went back to the MailKit discussion and there they told me to add the right smtp permissions.
So now I am totally confused..
I connect using the scope https://outlook.office365.com/.default.
I have added Graph (user.read, smtp.send, offline_access, openid, profile) and Office 365 Exhange online (Mail.send SMTP.sendasapp).
There I see IT administrator didn't grant smtp.sendasapp yet.
But again.. I should be able to connect by oauth2.. or are there other permissions to configure?