Dear all,
we have changed the Remote Mailbox connector, from IMAP Basic Auth to OAuth2, without issues. But , the email fetching job gets the email of the Office365 Admin User (used to grants the OS Ticket application) not the Email Address defined (helpdesk@.....com) in this section . The helpdesk@...com is not an admin / tenant admin , is a normal user. But, when we register the application , an Admin user is request to perform the grant operations. Which user should be used to configure in OS Ticket? The email will be sent to helpdesk@....com , thanks
1.17 Email Fetching OAuth2 Office365 - other mailbox
- Best Answerset by KevinTheJedi
You will need to follow the instructions here:
Cheers.
- Edited
Thanks, but the Global Admin has already Delegation for this sharedmailbox so what I can do?
Please re-read the instructions. You need to manually make changes to the plugin and follow the steps.
Cheers.
OAuth2 plugin is NOT in strict mode (default: false) --> How I can change this setting, to TRUE? thanks
It doesn’t need to be. Strict forces you to login and consent with the same email as the email you are setting up in the helpdesk.
Cheers.
KevinTheJedi ok, but this not work with the installed plugin. Or a new plugin has been released?
You have to download the plugin from our website, un-phar it, make the change listed in the post I linked earlier, go to the database, go to the ost_plugin
table, find the record for the oauth2 plugin, set isphar
to 0
and remove .phar
from the install_path
value, and it should then work with the steps I listed in that post.
Cheers.
ok thanks, how "un-phar" ?
There are many guides online that explain how to do this but the quick and easy way is to ssh to the server, navigate to the plugin folder, and run something like:
php -r '$phar = new Phar("phar-file.phar"); $phar->extractTo("./plugin-name");'
Where php
is the executable for the appropriate PHP version. This will extract the PHAR contents to a folder named plugin-name
(like auth-oauth2
).
Cheers.
- Edited
I extrated the phar file, then I have copied the folder under the plugin section. I have deleted the phar file. I have modified the oauth2.php then I have set strict_mode TRUE. So, I have loaded the new one plugin (disabling the old one); when I set all the MS 365 information, during the submit I get this error:
Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function setConfigClass() on null in /var/www/vhosts/support.XXXXX.com/include/plugins/auth-oauth2/oauth2.php:601\nStack trace:\n#0 /var/www/vhosts/support.XXXXX.com/include/class.email.php(682): GenericEmailOauth2Provider->getPluginInstance()\n#1 /var/www/vhosts/support.XXXXX.com/include/ajax.email.php(26): EmailAccount->saveAuth()\n#2 /var/www/vhosts/support.XXXXX.com/include/class.dispatcher.php(153): EmailAjaxAPI->configureAuth()\n#3 /var/www/vhosts/support.XXXXX.com/include/class.dispatcher.php(40): UrlMatcher->dispatch()\n#4 /var/www/vhosts/support.XXXXX.com/include/class.dispatcher.php(122): Dispatcher->resolve()\n#5 /var/www/vhosts/support.XXXXX.com/include/class.dispatcher.php(40): UrlMatcher->dispatch()\n#6 /var/www/vhosts/support.XXXXX.com/scp/ajax.php(326): Dispatcher->resolve()\n#7 {main}\n thrown in /var/www/vhosts/support.XXXXX.com/include/plugins/auth-oauth2/oauth2....', referer: https://support.XXXXX.com/scp/emails.php?id=5