Sounds like you don’t have a cron job/scheduled task running to automatically poll the mailbox which should auto-refresh itself.
Cheers.
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.
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
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.
njohnson We did have that issue in the past as well. It has not been a problem for us in the last year or so, I believe.
KevinTheJedi Thank you for the answer. It would be very helpful in future.
KevinTheJedi This worked for me.
This authenticated for me, but isn't actually pulling any emails through :-(
Edit2: This actually DOES work for me. I had no emails coming through for about an hour (on this mailbox, other mailboxes continued to work) and then as if by magic they started flowing through!
KevinTheJedi
PHP 8.1.30
osTicket 1.18.1
Oauth Plugin 0.6
TBH, I don't know for sure if we're running the latest build. I had updated it after the Token-timeout issue was supposed to have been resolved, but we never noticed a difference. I'm probably blind for not seeing the plugin version be referenced anywhere...what's the current version?
Would it break anything if I deleted the plugin from our installation and installed the current one that's posted (recognizing I'd need to do this code fix again)?
0.6 is latest but we don’t update the versions on the plugins as often because it’s usually very minor changes. So you really have to go off of when you downloaded it.
Don’t delete from UI just delete the existing PHAR and replace it with the latest build.
Cheers.
KevinTheJedi Thanks! I've replaced it as of today, so hopefully all our osticket problems are now resolved! You've been a great help!