I'm trying to connect to IMAP using the Azure Portal. I already generated my access token, but I'm getting the following error: "Reason: cannot change folder, maybe it does not exist." I've attached some screenshots.
2023-04-04 09:17:31 | Error | 601 | Failed to initialize the mailbox: itop@frro.utn.edu.ar. Reason: cannot change folder, maybe it does not exist | IssueLog
I have the same problem. Debus trace shows nothing despite being active but in error.log : Failed to initialize the mailbox: XXXX@XXX.XXX. Reason: cannot change folder, maybe it does not exist
I have tried with INBOX, Inbox and empty without success. Azure permissions are assigned
Microsoft Graph MailboxFolder.ReadWrite.All Read and write all the users' mailbox folders
Microsoft Graph MailboxSettings.ReadWrite Read and write all user mailbox settings
Microsoft Graph email View users' email address
Microsoft Graph IMAP.AccessAsUser.All Read and write access to mailboxes via IMAP.
Microsoft Graph offline_access Maintain access to data you have given it access to
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello
I'm trying to connect to IMAP using the Azure Portal. I already generated my access token, but I'm getting the following error: "Reason: cannot change folder, maybe it does not exist." I've attached some screenshots.
I forgot to mention that my iTop version is 3.0.2 and I try in two versions of php (7.4 and 8.0).
Make sure that the user account which was used to generate the token, also has proper full access permissions on the mailbox (Exchange Online).
I use the Administrator user for the token generation, and the mailbox has de correct permition. I dont know where is the error.
This is the content of the error log file.
2023-04-04 09:17:31 | Error | 601 | Failed to initialize the mailbox: itop@frro.utn.edu.ar. Reason: cannot change folder, maybe it does not exist | IssueLog
array (
'file' => '/var/www/html/itop/lib/laminas/laminas-mail/src/Storage/Imap.php',
'line' => 384,
'exception.class' => 'Laminas\Mail\Storage\Exception\RuntimeException',
'exception.stack' => '#0 /var/www/html/itop/env-production/combodo-oauth-email-synchro/src/Service/IMAPOAuthStorage.php(53): Laminas\Mail\Storage\Imap->selectFolder()
**####1 /var/www/html/itop/env-production/combodo-oauth-email-synchro/src/Service/IMAPOAuthEmailSource.php(57): Combodo\iTop\Extension\Service\IMAPOAuthStorage-> construct()
Also I give several permitions in API Secctions.
Any help will be appreciated.
Cristian
You might see more after enabling the debug trace.
The debug tracer is enabled, but I can´t get any information other than the information it has given to me.
Different one perhaps. Not sure if it will help, assuming all your permissions are OK:
https://www.itophub.io/wiki/page?id=2_7_0:admin:oauth#troubleshooting
Might also help to re-generate the token.
Make sure the user who consents to the permissions, also has the "full access" permission on Microsoft Exchange Online to this mailbox.
Last edit: Jeffrey Bostoen 2023-04-05
I have the same problem. Debus trace shows nothing despite being active but in error.log : Failed to initialize the mailbox: XXXX@XXX.XXX. Reason: cannot change folder, maybe it does not exist
'file' => '/itop/lib/laminas/laminas-mail/src/Storage/Imap.php',
'line' => 404,
'exception.class' => 'Laminas\Mail\Storage\Exception\RuntimeException',
I have tried with INBOX, Inbox and empty without success. Azure permissions are assigned
Microsoft Graph MailboxFolder.ReadWrite.All Read and write all the users' mailbox folders
Microsoft Graph MailboxSettings.ReadWrite Read and write all user mailbox settings
Microsoft Graph email View users' email address
Microsoft Graph IMAP.AccessAsUser.All Read and write access to mailboxes via IMAP.
Microsoft Graph offline_access Maintain access to data you have given it access to
Can you show the config in iTop? In particular, the "scope".