[X] I agree to follow this project's Code of Conduct
Is there an existing issue for this?
[X] I have searched the existing issues
Version
10.0.1
Bug description
I am getting the following error when I try to retrieve emails from an o365 mailbox:
An error occurred trying to connect to collector. cannot change folder, maybe it does not exist
According to the oauthimap plugin's documentation, we need to:
Register our app in Azure AD and get credentials (Application ID, Tenant ID and Client Secret)
Grant it some permissions to access a user mailbox ( email, IMAP.AccessAsUser.All, offline_access, openid, User.Read)
Install the plugin and configure with the credentials from Azure AD
Create an authorization with our Oauth IMAP application in GLPI
Create an authorization with our desired email
Create a collector (Receiver) with the authorization we created
Hit Get email now to test it
I followed all the steps above but when I hit the Get email button, I am getting an error
Relevant log output
[2022-06-28 14:30:31] glpiphplog.CRITICAL: *** Uncaught Exception Laminas\Mail\Storage\Exception\RuntimeException: cannot change folder, maybe it does not exist in C:\xampp\htdocs\glpi\vendor\laminas\laminas-mail\src\Storage\Imap.php at line 386
Backtrace :
...authimap\inc\imap\imapoauthstorage.class.php:77 Laminas\Mail\Storage\Imap->selectFolder()
...oauthimap\inc\mailcollectorfeature.class.php:99 GlpiPlugin\Oauthimap\Imap\ImapOauthStorage->__construct()
src\Toolbox.php:2103 GlpiPlugin\Oauthimap\MailCollectorFeature::GlpiPlugin\Oauthimap\{closure}()
src\MailCollector.php:1369 Toolbox::getMailServerStorageInstance()
src\MailCollector.php:692 MailCollector->connect()
front\mailcollector.form.php:103 MailCollector->collect()
Page URL
No response
Steps To reproduce
Register our app in Azure AD and get credentials (Application ID, Tenant ID and Client Secret)
Grant it some permissions to access a user mailbox ( email, IMAP.AccessAsUser.All, offline_access, openid, User.Read)
Install the plugin and configure with the credentials from Azure AD
Create an authorization with our Oauth IMAP application in GLPI
Create an authorization with our desired email
Create a collector (Receiver) with the authorization we created
Hit Get email now to test it
Your GLPI setup information
Information about system installation and configuration
GLPI 10.0.1 (/glpi => C:\xampp\htdocs\glpi)
Installation mode: TARBALL
Current language:en_GB
Server
Operating system: Windows NT BCMDLAAPP007VM 10.0 build 14393 (Windows Server 2016) AMD64
PHP 7.4.29 apache2handler (Core, PDO, Phar, Reflection, SPL, SimpleXML, apache2handler, bcmath, bz2, calendar, ctype, curl,
date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, intl, json, ldap, libxml, mbstring, mysqli, mysqlnd,
openssl, pcre, pdo_mysql, pdo_sqlite, readline, session, sodium, standard, tokenizer, xml, xmlreader, xmlwriter, zip, zlib)
Setup: max_execution_time="120" memory_limit="512M" post_max_size="40M" safe_mode="" session.save_handler="files"
upload_max_filesize="40M"
Software: Apache/2.4.53 (Win64) OpenSSL/1.1.1n PHP/7.4.29 (Apache/2.4.53 (Win64) OpenSSL/1.1.1n PHP/7.4.29 Server at localhost
Port 80
)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36
Server Software: mariadb.org binary distribution
Server Version: 10.4.24-MariaDB
Server SQL Mode: NO_ZERO_IN_DATE,NO_ZERO_DATE,NO_ENGINE_SUBSTITUTION
Parameters: root@localhost/glpi
Host info: localhost via TCP/IP
PHP version (7.4.29) is supported.
Sessions configuration is OK.
Allocated memory is sufficient.
mysqli extension is installed.
Following extensions are installed: dom, fileinfo, json, simplexml.
curl extension is installed.
gd extension is installed.
intl extension is installed.
libxml extension is installed.
zlib extension is installed.
The constant SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES is present.
Database engine version (10.4.24) is supported.
The log file has been created successfully.
Write access to C:\xampp\htdocs\glpi/files/_cache has been validated.
Write access to C:\xampp\htdocs\glpi/config has been validated.
Write access to C:\xampp\htdocs\glpi/files/_cron has been validated.
Write access to C:\xampp\htdocs\glpi/files has been validated.
Write access to C:\xampp\htdocs\glpi/files/_dumps has been validated.
Write access to C:\xampp\htdocs\glpi/files/_graphs has been validated.
Write access to C:\xampp\htdocs\glpi/files/_lock has been validated.
Write access to C:\xampp\htdocs\glpi/files/_pictures has been validated.
Write access to C:\xampp\htdocs\glpi/files/_plugins has been validated.
Write access to C:\xampp\htdocs\glpi/files/_rss has been validated.
Write access to C:\xampp\htdocs\glpi/files/_sessions has been validated.
Write access to C:\xampp\htdocs\glpi/files/_tmp has been validated.
Write access to C:\xampp\htdocs\glpi/files/_uploads has been validated.
Web access to files directory is protected
exif extension is installed.
ldap extension is installed.
openssl extension is installed.
zip extension is installed.
bz2 extension is installed.
Zend OPcache extension is not present.
Following extensions are installed: ctype, iconv, mbstring, sodium.
Write access to C:\xampp\htdocs\glpi/marketplace has been validated.
Timezones seems not loaded, see https://glpi-install.readthedocs.io/en/latest/timezones.html.
htmlawed/htmlawed version 1.2.6 in (C:\xampp\htdocs\glpi\vendor\htmlawed\htmlawed)
phpmailer/phpmailer version 6.6.0 in (C:\xampp\htdocs\glpi\vendor\phpmailer\phpmailer\src)
simplepie/simplepie version 1.5.8 in (C:\xampp\htdocs\glpi\vendor\simplepie\simplepie\library)
tecnickcom/tcpdf version 6.4.4 in (C:\xampp\htdocs\glpi\vendor\tecnickcom\tcpdf)
michelf/php-markdown in (C:\xampp\htdocs\glpi\vendor\michelf\php-markdown\Michelf)
true/punycode in (C:\xampp\htdocs\glpi\vendor\true\punycode\src)
iamcal/lib_autolink in (C:\xampp\htdocs\glpi\vendor\iamcal\lib_autolink)
sabre/dav in (C:\xampp\htdocs\glpi\vendor\sabre\dav\lib\DAV)
sabre/http in (C:\xampp\htdocs\glpi\vendor\sabre\http\lib)
sabre/uri in (C:\xampp\htdocs\glpi\vendor\sabre\uri\lib)
sabre/vobject in (C:\xampp\htdocs\glpi\vendor\sabre\vobject\lib)
laminas/laminas-i18n in (C:\xampp\htdocs\glpi\vendor\laminas\laminas-i18n\src)
laminas/laminas-servicemanager in (C:\xampp\htdocs\glpi\vendor\laminas\laminas-servicemanager\src)
monolog/monolog in (C:\xampp\htdocs\glpi\vendor\monolog\monolog\src\Monolog)
sebastian/diff in (C:\xampp\htdocs\glpi\vendor\sebastian\diff\src)
donatj/phpuseragentparser in (C:\xampp\htdocs\glpi\vendor\donatj\phpuseragentparser\src\UserAgent)
elvanto/litemoji in (C:\xampp\htdocs\glpi\vendor\elvanto\litemoji\src)
symfony/console in (C:\xampp\htdocs\glpi\vendor\symfony\console)
scssphp/scssphp in (C:\xampp\htdocs\glpi\vendor\scssphp\scssphp\src)
laminas/laminas-mail in (C:\xampp\htdocs\glpi\vendor\laminas\laminas-mail\src\Protocol)
laminas/laminas-mime in (C:\xampp\htdocs\glpi\vendor\laminas\laminas-mime\src)
rlanvin/php-rrule in (C:\xampp\htdocs\glpi\vendor\rlanvin\php-rrule\src)
blueimp/jquery-file-upload in (C:\xampp\htdocs\glpi\vendor\blueimp\jquery-file-upload\server\php)
ramsey/uuid in (C:\xampp\htdocs\glpi\vendor\ramsey\uuid\src)
psr/log in (C:\xampp\htdocs\glpi\vendor\psr\log\Psr\Log)
psr/simple-cache in (C:\xampp\htdocs\glpi\vendor\psr\simple-cache\src)
psr/cache in (C:\xampp\htdocs\glpi\vendor\psr\cache\src)
league/csv in (C:\xampp\htdocs\glpi\vendor\league\csv\src)
mexitek/phpcolors in (C:\xampp\htdocs\glpi\vendor\mexitek\phpcolors\src\Mexitek\PHPColors)
guzzlehttp/guzzle in (C:\xampp\htdocs\glpi\vendor\guzzlehttp\guzzle\src)
guzzlehttp/psr7 in (C:\xampp\htdocs\glpi\vendor\guzzlehttp\psr7\src)
glpi-project/inventory_format in (C:\xampp\htdocs\glpi\vendor\glpi-project\inventory_format\lib\php)
wapmorgan/unified-archive in (C:\xampp\htdocs\glpi\vendor\wapmorgan\unified-archive\src)
paragonie/sodium_compat in (C:\xampp\htdocs\glpi\vendor\paragonie\sodium_compat\src)
symfony/cache in (C:\xampp\htdocs\glpi\vendor\symfony\cache)
html2text/html2text in (C:\xampp\htdocs\glpi\vendor\html2text\html2text\src)
symfony/css-selector in (C:\xampp\htdocs\glpi\vendor\symfony\css-selector)
symfony/dom-crawler in (C:\xampp\htdocs\glpi\vendor\symfony\dom-crawler)
twig/twig in (C:\xampp\htdocs\glpi\vendor\twig\twig\src)
twig/string-extra in (C:\xampp\htdocs\glpi\vendor\twig\string-extra)
symfony/polyfill-ctype not found
symfony/polyfill-iconv not found
symfony/polyfill-mbstring not found
symfony/polyfill-php80 in (C:\xampp\htdocs\glpi\vendor\symfony\polyfill-php80)
symfony/polyfill-php81 in (C:\xampp\htdocs\glpi\vendor\symfony\polyfill-php81)
Code of Conduct
Is there an existing issue for this?
Version
10.0.1
Bug description
I am getting the following error when I try to retrieve emails from an o365 mailbox:
An error occurred trying to connect to collector. cannot change folder, maybe it does not exist
According to the oauthimap plugin's documentation, we need to:
email
,IMAP.AccessAsUser.All
,offline_access
,openid
,User.Read
)I followed all the steps above but when I hit the Get email button, I am getting an error
Relevant log output
Page URL
No response
Steps To reproduce
email
,IMAP.AccessAsUser.All
,offline_access
,openid
,User.Read
)Your GLPI setup information
Information about system installation and configuration
Server
GLPI constants
Libraries
SQL replicas
Notifications
Plugins list
Anything else?
No response