Hello,
I have created an application in Azure for OAuth 2 authentication, to use it in a web application.
The problem is that I have already set all the corresponding permissions following the https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth site, it gets the token correctly, but it does not connect to the IMAP server.
The screenshot of the applied permissions:
The scopes used to get the access token are: openid, profile, email, offline_access and https://graph.microsoft.com/IMAP.AccessAsUser.All.
The web application is in a development environment, and I use a Rust library to make the connection.
The configuration used is:
Server: outlook.office365.com
Port: 993
Even updating the access token using the refresh token works correctly, but not the connection to the IMAP server.
The error I get when trying to authenticate is: NO AUTHENTICATE failed
Maybe it is necessary to add the users in some Azure service, to later give public access to the users when the application is published and verified?
Thank you for your support,
Jorge