KevinTheJedi this fix works on my end, at least to register a new email address using microsoft oauth2. I haven't test yet if it receives and sends email, but at least it allowed me to save the email.
MS OAuth2 Error: The API version 'V2' has been depreciated.
Hi @KevinTheJedi I just came across this issue today as my token just expired. I did your fix to the plugin but it has not changed anything else. I've rebooted the system but when I try to go back and reconfigure the authentication again after the plugin change I still have the same "array ( 'code' => 'Gone', 'message' => 'The API version \'V2\' has been deprecated.', )
Email Fetching" error.
Are there other steps we need to do to make this work? Other settings to change etc? I have to re-register? uninstall. All I saw in your fix was to update the plugin.
Thanks.
KevinTheJedi yes I did the commands you posted in your solution.
Hi @KevinTheJedi thank you!. I'm guessing the changes to the function didn't get saved I was able to reconfirm the database changes and it is once again creating new tickets /replies.
I'm curious if there's a time frame for release of the updated plugin? I'm not seeing a version or release number mentioned on the https://osticket.com/download/ plugins download page so it's difficult to tell from there if an update has been released. Thanks!
How is this done on a Windows server? I dont see a oauth.php file, just a phar file. How do I modify the correct file, thank you.
ITInTheory You can always follow the plugin repo for updates.
KevinTheJedi I can confirm this got us going today, i hope it sticks. Are the endpoints truly deprecated?
Thank you for the fix. It worked for us. We use Office365 bussines accounts...
- Edited
Hello KevinTheJedi, thank you for very much for coming back to me. Our ticketing system is almost working successfully with your fix. What we are experiencing at moment is that we constantly need to go admin panels, emails on the remote mailbox page we need to click on config and press save in order to refresh the token and download new ticket. Any reason why? It was done automatically before applying this fix.
To anyone experiencing issue with extracting the phar file on windows, instead of trying with the command line, go on unphar[dot]com/extract load the phar file and save the zip file in the plugin folder on OSTicket (wwwroot; OSTicket; include; plugin). Once the zip file is in there, extract it and from there open the folder and edit the oauth2.php file and follow the guide from Kevin.
Thanks again Kevin
Sounds like you don’t have a cron job/scheduled task running to automatically poll the mailbox which should auto-refresh itself.
Cheers.
jens_E It appears so, yes.
- Edited
I created a new instance yesterday and did the suggested with the .json file however in getting an error
"cannot select INBOX, is this a valid transport?"
OSticket v1.17.5
Apache/2.4.54
MySQL Version 8.0.31
PHP Version 8.0.13
Is the account a real email or a shared mailbox/alias/resource email? Is IMAP enabled for the account and tenant? Does the account have a security policy attached preventing IMAP? Did you add and provide admin consent for the IMAP API Permission within the App Registration?
Cheers.
KevinTheJedi This is a real account, now that i think about it IMAP was disabled globally, i would need to enable it for these newly created account. Thanks @KevinTheJedi
- Edited
KevinTheJedi I followed the instructions the best I could (I'm not familiar at all with php - our osTicket installation is done via a one-click installer in cPanel), but once I make the db change, I get a HTTP 500 error when I try refreshing the page.
I replaced the entire "public function callback($resp, $ref=null)" from { to } with your code. Was that the right approach, or should I be looking for a different section of the oauth2.php file?
(I know I did something wrong, but I don't know what. When I change the db reference back to the .phar file, the page loads correctly)
You search for the correct class (ie. class OAuth2EmailAuthBackend
) and replace that class’ callback
function from public
to }
with the full code block from my earlier post.
Cheers.
KevinTheJedi Hurm. I got the same error, so I rinsed and repeated the whole process. Extracted the .phar, edited the .php file (making sure to overwrite the correct location), then copied it to the server. Changed the db install_path and isphar settings, and got the HTTP 500 error again.
I'm running v1.18.1 with OAuth2 Client v0.6
Any more ideas? If an updated plugin will be released within a week or two, we can probably wait it out, but it'd be great if we can get this working