kontron / redmine_oauth

Redmine authentication through OAuth.
GNU General Public License v2.0
57 stars 27 forks source link

"AUTHENTICATE failed" when trying to recieve mails via IMAP #3

Closed Media-IT closed 1 year ago

Media-IT commented 1 year ago

HI,

I have a problem when im running the rake command to recieve mails via IMAP.

The login via the Button on the Login-Page of the Server works fine. I get the corespondig entry for a successful login in the M365-Logs.

But when running the rake task to recieve Mails via IMAP , I get the Error "AUTHENTICATE failed"

I run this command: rake -f /opt/bitnami/redmine/Rakefile redmine_oauth:email:receive_imap RAILS_ENV="production" no_permission_check=1 unknown_user=accept project=testprojekt1 tracker=Aufgabe category=Mailticket host=outlook.office365.com port=993 ssl=1 scope=https://outlook.office365.com/.default username=myuser password='mypassword' --trace

And I get this output:

** Invoke redmine_oauth:email:receive_imap (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine_oauth:email:receive_imap
AUTHENTICATE failed.

Do you have an idea why this happens or how i can fix this? Best Regards!

picman commented 1 year ago

This is very probably related to your Azure configuration. Have you followed all the recommendations from README? Are you able to to connect via IMAP with this user from another client? Concerning your parameters, host, scope and port are default, password is not used. You can omit them.

Media-IT commented 1 year ago

I started all over again and recreated the API. Now it works. I'm guessing it was an error in the API permissions, but I can't say for sure. Thank you for your time!