javanile / php-imap2

PHP IMAP with OAUTH2
https://php-imap2.javanile.org/
GNU General Public License v3.0
54 stars 31 forks source link

PHP Imap 2 outlook #44

Closed albertopitti closed 1 year ago

albertopitti commented 1 year ago

I'm trying to authenticate to outlook, the azure application is configured well, I tested it with the powershell script mentioned here http://wiki.canfigure.net/en/guides/exchange-oauth2, but I receive the message: Can not authenticate to IMAP server: A0001 NO AUTHENTICATE failed. I obtain the token with https://github.com/TheNetworg/oauth2-azure and it works fine and then try with imap2_open('{outlook.office365.com:993/imap/ssl}', 'name@domain.com', $token, OP_XOAUTH2) got me that error

gabriel-tandil commented 1 year ago

if it is a generic domain account try adding MAILBOX after .../ssl}

timrasche commented 1 year ago

+1 gabriel-tandil's answer does not help

albertopitti commented 1 year ago

I found the issue, it was on the library to get the token, it uses an old endpoint and still gives me a token