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!
MS OAuth2 Error: The API version 'V2' has been depreciated.
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
All you need to do is follow my instructions in my post to a t and it will work. You can check your PHP error logs for a reason for the 500 error.
Cheers.
Modifying the plug-in allowed us to get connected, so thank you for that!
Our support staff didn't notice that we weren't getting tickets until today, so we ended up with eight days of tickets in their queue once it started working again. How they didn't notice I have no idea, since now they've got 40 tickets to clear (or maybe they did and were enjoying the vacation from tickets). Is there a way to get some kind of notification from osTicket when the token expires?
Not at this moment but something we’ve been toying with. So maybe it will be implemented in the future; I can’t say for sure.
Cheers.
KevinTheJedi I downloaded the oauth2.php file from github and modified that instead of what had come from extracting the plugin on our instance, made the changes, uploaded it, and everything is working great! Thank you for all your help!!
idunbar_usf For what it's worth, we frequently run into the issue of the token expiring without us noticing. The token doesn't seem to be persisting beyond 30 days for us. I've gone through the documentation and steps a number of times and everything looks correct, but as I'm learning through this process, something seems to be a bit different with our installation. Not sure what though.
Anyway, we have a script that sends a test email to our system each week, and when we see that the ticket wasn't opened, we know we need to manually refresh the token. It means that there's a window of time where new tickets possibly aren't being submitted, but for our environment, a couple of days isn't a big deal.
What version of PHP are you running? Are you certain you have the latest build of the plugin installed? We did have that issue long ago with Microsoft emails but was fixed a while ago.
Cheers.