I connected office 365 to osticket
my app expires in 2 years but osticket shows its expired
how can I fix that
email fetches are stopping
https://i.imgur.com/JggeZSr.png

see screenshot.

Thanks

  • KevinTheJedi replied to this.
  • alcero

    Then your cron job is not working or you don't have the setting enabled in osTicket. Go to Admin Panel > Emails > Settings, look for Email Fetching, check the box next to Enable, uncheck the box next to Fetch on auto-cron, and Save Changes. Now go set your Log Level to DEBUG, run the cron, and check the system logs to see if it added a cron job entry saying it executed.

    Cheers.

    alcero

    Upgrade to v1.17.3, install the latest build of the OAuth2 plugin, get a new token, and you should be good.

    The Access Token will always expire in 1 hour by default. We then use the Refresh Token to refresh the Access Token on expiration which will give a new Access Token, new Refresh Token, and new expiration time. There was however a previous bug where we weren't updating the Refresh Token so about 90 days later it will stop working and you have to manually get a new token. With v1.17.3 and new build of OAuth2 plugin the bug was addressed. Once you do the above, moving forward, the tokens should only stop working when the Client Secret expires OR something from MS end invalidates the tokens (usually very rare).

    Cheers.

      KevinTheJedi I upgraded ost and plugins like you mentioned
      How do I get new token?
      I deleted the token
      when I press submit
      I get this
      "No input file specified."

      Thanks

        alcero

        You can google that error to see what's causing that. Nothing from the software though. Could be PHP misconfigurations/restrictions, URL Rewriting not enabled on the webserver, incorrect URLs being used, etc.

        Cheers.

        alcero

        Typically this is due to URL Rewriting not being enabled on the webserver. What webserver are you using? You never posted a screenshot of your Admin Panel > Dashboard > Information page so we don't know what your environment looks like.

        Cheers.

        Connection worked now
        But big delays on opening tickets when we send email to support email. Is that normal? We have set fetch to 1min

          7 days later

          I did
          Now it's only pulling email when I log in to the system
          Seems like it's going to sleep when no one is logged in or visiting our support site

            alcero

            Then your cron job is not working or you don't have the setting enabled in osTicket. Go to Admin Panel > Emails > Settings, look for Email Fetching, check the box next to Enable, uncheck the box next to Fetch on auto-cron, and Save Changes. Now go set your Log Level to DEBUG, run the cron, and check the system logs to see if it added a cron job entry saying it executed.

            Cheers.

              alcero

              That’s the one. Then it appears your cron job statement is not correct or you didn’t set the Log Level to DEBUG. Please contact your host for the proper path to the correct PHP version.

              Cheers.

              alcero

              Well you can enable it temporarily so email still fetches. Then you can disable it once the cron is actually working. It's only needed if you can't setup cron for some reason.

              Cheers.

                alcero

                I’m assuming the PHP path is incorrect. Typically they have multiple versions of PHP installed and they have special paths. Contact your hosting provider for the correct PHP path to use.

                Cheers.

                But when I log in osticket, the fetch works.
                Is tgis normal? Is it still cron issue?

                Do you know what command needs to be set in cron?
                Command
                /usr/bin/php -q /home/custom
                Is this good?

                  alcero

                  But when I log in osticket, the fetch works.
                  Is tgis normal? Is it still cron issue?

                  That's because it's using Auto-cron which is a crutch really. Yes, still means cron job isn't working properly. As I mentioned above: Contact your hosting provider for the correct PHP path to use.

                  Do you know what command needs to be set in cron?

                  It's typically:

                  php /path/to/osticket/api/cron.php

                  However as I said above you are using a hosting provider and each provider has their own specific setup. You need to contact your host for further assistance.

                  Cheers.

                  Write a Reply...