First of all, thank you @KevinTheJedi for being an absolute legend. Was able to get our system fixed thanks to your speedy resolution.

Second, just wanted to share that you can use Phar => zip converters and make the adjustments on a local client machine if need be. That's what I did and FTP'ed the updated files to the server.

    ElbowNi

    Leave it extracted and update the database. You don’t know if you repackaged it correctly and it could still have issues. Although if you were able to get a token it should be fine. Also you would need to make sure you logged in as the email itself (using incognito window). You also need to make sure fetching is enabled globally and that you have a valid running cron job/scheduled task. Lastly check your system logs for any related errors.

    Cheers.

      KevinTheJedi
      Cheers for getting back, I did notice the Green Token is just expiring, rather than renewing also the cron job is getting this syslog error
      CRON[8181]: (osticket) CMD (php /var/www/html/osticket/api/cron.php)
      CRON[8180]: (CRON) info (No MTA installed, discarding output)

        ElbowNi

        That means you likely used wrong account when it brought you to MS to authenticate. Login and authorize as the email you are configuring in osTicket.

        Cheers.

        KevinTheJedi "set the install_path to plugins/auth-oauth2 (just remove the .phar)" maybe i did something wrong here... can you tell me all the commands please? and what i need to do? i'm not an expert of mysql

          Gian2003k

          If you don't know how to run SQL queries then you should use a database GUI like HeidiSQL (windows) or SequelAce (mac). If you can't do that then you should simply wait for the new build of plugin to be released. Or follow the above instructions from @ElbowNi to repackage so you don't have to mess with db.

          Cheers.

            Gian2003k you can use following commands to do that:

            change for, if the plugin is a dir:
            UPDATE ost_plugin SET install_path = 'plugins/auth-oauth2', isphar = '0' WHERE install_path LIKE 'plugins/auth-oauth2%';
            change for, if the plugin is a phar file:
            UPDATE ost_plugin SET install_path = 'plugins/auth-oauth2.phar', isphar = '1' WHERE install_path LIKE 'plugins/auth-oauth2%';

            I hope, it helps you to do the task.

              jens_E I'm still getting this: array ( 'code' => 'Gone', 'message' => 'The API version \'V2\' has been deprecated.', )

              @Gian2003k Did you unpack the plugin and make the changes from #41 above?
              You have to unpack the phar and make the changes and upload the changed files

                jens_E Yeah, i edited the oauth2.php file with the changes under OAuth2AuthBackend

                jens_E I did everything and the plugin is installed but when i try to configure the authentication i get this:

                  Gian2003k
                  Are you logged in?
                  Please look at your php error log. It seems you get a php 500 error. Look at your modified code, if you have a typing error...