Code of Conduct
Is there an existing issue for this?
GLPI Version
11.0.8
Plugin version
1.5.3
Bug description
When configuring a Mail Collector (Receiver) using an OAuth IMAP connection option,
selecting the OAuth authorization in the "Connection options" dropdown triggers an
AJAX POST request to dropdownAuthorization.php. On installations where GLPI runs
in a subdirectory (not domain root), this request is built with an incomplete/incorrect
path, resulting in a 404.
As a consequence, the "Login" field (email account associated with the OAuth
authorization) is never populated/displayed in the Mail Collector form, making it
impossible to properly configure the receiver.
Relevant log output
Page URL
No response
Steps To reproduce
- Install and configure OAuth IMAP plugin with a valid Azure/Entra ID application
- Create an OAuth authorization successfully (confirmed working — can browse mailbox,
see message count via plugin diagnostics)
- Go to Setup > Receivers > Add new
- In "Connection options", select the OAuth authorization created in step 2
- Open browser dev tools (Network/Console tab)
Your GLPI setup information
- GLPI version: 11.0.8
- Plugin version: OAuth IMAP 1.5.3
- Installation path:
https://[domain]/glpi/ (GLPI installed in a subdirectory, not domain root)
- Hosting: shared hosting (cPanel), no SSH access
- PHP: 8.3
Anything else?
The "Login" field should be automatically populated with the email address associated
with the selected OAuth authorization (as shown in the plugin's own documentation
screenshots).
-
Browser console shows a failed POST request:
https://[domain]/plugins/oauthimap/ajax/dropdownAuthorization.php
404 (Not Found)
-
Note the URL is missing the GLPI subdirectory (/glpi/) — actual GLPI installation
is at https://[domain]/glpi/, so the correct path would be
https://[domain]/glpi/plugins/oauthimap/ajax/dropdownAuthorization.php
-
Also note: the physical file exists under marketplace/oauthimap/ajax/dropdownAuthorization.php
(not plugins/oauthimap/), consistent with GLPI's renamed plugin directory in recent versions.
-
As a workaround test, I added an Apache rewrite rule at document root to redirect
/plugins/oauthimap/(.*) to /glpi/marketplace/oauthimap/$1. This changed the error
from 404 to 500 (Internal Server Error), suggesting the script itself has additional
path-dependent assumptions that break when not accessed through its "natural" route/context.
-
Because this AJAX call never succeeds, the "Login" field never appears in the Receiver
form, blocking the Mail Collector configuration entirely.
Additional context
This appears to be a known/recurring issue — similar reports found in the GLPI forum
describing the exact same missing /glpi segment in AJAX calls generated by this plugin,
also on GLPI 11.x installations in a subdirectory. I could not find a resolved fix in
the latest available plugin version (1.5.3).
Happy to provide further logs/screenshots if useful.
Code of Conduct
Is there an existing issue for this?
GLPI Version
11.0.8
Plugin version
1.5.3
Bug description
When configuring a Mail Collector (Receiver) using an OAuth IMAP connection option,
selecting the OAuth authorization in the "Connection options" dropdown triggers an
AJAX POST request to
dropdownAuthorization.php. On installations where GLPI runsin a subdirectory (not domain root), this request is built with an incomplete/incorrect
path, resulting in a 404.
As a consequence, the "Login" field (email account associated with the OAuth
authorization) is never populated/displayed in the Mail Collector form, making it
impossible to properly configure the receiver.
Relevant log output
Page URL
No response
Steps To reproduce
see message count via plugin diagnostics)
Your GLPI setup information
https://[domain]/glpi/(GLPI installed in a subdirectory, not domain root)Anything else?
The "Login" field should be automatically populated with the email address associated
with the selected OAuth authorization (as shown in the plugin's own documentation
screenshots).
Browser console shows a failed POST request:
https://[domain]/plugins/oauthimap/ajax/dropdownAuthorization.php
404 (Not Found)
Note the URL is missing the GLPI subdirectory (
/glpi/) — actual GLPI installationis at
https://[domain]/glpi/, so the correct path would behttps://[domain]/glpi/plugins/oauthimap/ajax/dropdownAuthorization.phpAlso note: the physical file exists under
marketplace/oauthimap/ajax/dropdownAuthorization.php(not
plugins/oauthimap/), consistent with GLPI's renamed plugin directory in recent versions.As a workaround test, I added an Apache rewrite rule at document root to redirect
/plugins/oauthimap/(.*)to/glpi/marketplace/oauthimap/$1. This changed the errorfrom 404 to 500 (Internal Server Error), suggesting the script itself has additional
path-dependent assumptions that break when not accessed through its "natural" route/context.
Because this AJAX call never succeeds, the "Login" field never appears in the Receiver
form, blocking the Mail Collector configuration entirely.
Additional context
This appears to be a known/recurring issue — similar reports found in the GLPI forum
describing the exact same missing
/glpisegment in AJAX calls generated by this plugin,also on GLPI 11.x installations in a subdirectory. I could not find a resolved fix in
the latest available plugin version (1.5.3).
Happy to provide further logs/screenshots if useful.