My situation is an ASP.NET MVC application that need to send emails. My email is Office 365
I tried these steps https://github.com/jstedfast/MailKit/blob/master/ExchangeOAuth2.md
On Azure AD as permission, I have Microsoft Graph and Microsoft Exchange Online.
How configure the permissions on AD for that work with mailkit?
Thanks in advance
Configure the below API permissions on Azure AD to authenticate mailkit:
Go to Azure AD application -> Add a permission -> APIs my organization uses -> Office 365 Exchange Online
Assign application and delegated API permissions based on your application:
And add grant access to the user:
Make use of below code to authenticate:
Reference:
MailKit/ExchangeOAuth2.md at master · jstedfast/MailKit · GitHub