Open mitebu opened 4 months ago
I do have the same problem, just not a solution yet. The connection succeeds but when calling the folders endpoint, the BAD User is authenticated but not connected issue shows itself. At first I tested with a private account at Outlook.com which worked like a charm, but now I'm trying to connect to a business account at Office365.com and I have to go through 100 extra steps (f.e. due to MFA authentication) to set all the correct access rights so the connect() function already passed.
@mitebu @Webklex Today my colleague and I found out that this pull request fixes our issue too: https://github.com/Webklex/php-imap/pull/474
Het problem is that now that empty children of subfolders (because they haven't any children) throw an exception, while at their parent level folders have been found already. Due to the recursiveness of the folder function the issue occurs.
Hi
I'm having an issue configuring an IMAP connection to an Outlook365 account with oAuth token. First of all, I attach the steps configured in Microsoft Entra ID, with this guide: Microsoft Answers
After configuring and testing the output of the Powershell script, I can read and access without problems to the folders of the mailbox.![prueba imap censored](https://github.com/Webklex/php-imap/assets/151068695/6ce89a94-5269-47b6-b583-b6d5dc69a171)
But when I'm configuring the PHP-IMAP library for this connection, I reach the conection (user is authenticated) but when I try to read the folders ($client->getFolders();) it throws the error.
After contacting Microsoft Azure support, their answer is that with Powershell works, the problem is in the library or code configured. I've been searching for a solution with no result, maybe some1 had the same problem and can help me? Adittional information needed please aske me for it.
Best regards