njohnson

I'd also recommend that you not use a 3rd party installer.

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)?

    njohnson

    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!

      PHP 8.0.27
      MySQL 8.0.15
      osTicket 1.17.5
      Oauth Plugin 0.6
      Windows Server 2022

      I've been using OAuth2 and just ran into this issue. I've followed the steps to unpack the auth-oauth2.phar file and edit the database. Everything there matches what @KevinTheJedi wrote here (https://forum.osticket.com/d/105728-ms-oauth2-error-the-api-version-v2-has-been-depreciated/41). OAuth2 authorization is successful, but I'm getting the 5.7.3 Authentication unsuccessful on the outgoing (SMTP).

      In addition, these are full mailboxes, not shared. Authenticated SMTP (and all other protocols) is enabled on the user's mailboxes.

        mrudella

        Check if the API Permission is added and admin consented in the app registration. Make sure the user has Authenticated SMTP enabled in O365. Also make sure the user doesn’t have a policy attached that restricts/blocks SMTP.

        Cheers.

          KevinTheJedi
          Thanks for the reply. I've verified the API permissions and Authenticated SMTP. No policies in effect that would restrict/block SMTP.

            KevinTheJedi
            Yes, I am. The enterprise app and app registration is shared among all of the email accounts within osticket, but I am using an incognito window and authenticating with each unique user/mailbox login. Also, if it matters, I’m using the tenant-created accounts with onmicrosoft.com logins/addresses. It’s been setup that way since changing over to OAuth.

              mrudella

              Then you should be fine. Maybe disable SMTP, reenable it, and retest for each account?

              Cheers.

                We also have this problem with SMTP.

                The "hack" worked OK for the accounts we use to only receive email, but the account we use to send cannot authenticate:

                This is not a new account, used to work fine up until yesterday.

                  KevinTheJedi

                  Thanks for confirming. I have disabled and enabled Authenticated SMTP for these accounts and will be testing in a few hours.

                  KevinTheJedi

                  I created a ticket with Office 365 support and they recommended a test via powershell:

                    Let's first turn off MFA, Conditional Access Policies, Security Default.
                   
                    Then you could run PowerShell commands below to narrow down done if the issue occurs within our side. If the PowerShell command can send successfully, then the issue occurs within just the app scope but not from our side.
                   
                    $cred = get-credential
                    Send-MailMessage -To "user@domain.com" -from "user@domain.com" -Subject 'Test message' -smtpserver smtp.office365.com -usessl -Credential $cred -Port 587

                  The results of that test email were successful and I received it from one of the accounts that is used by OSTicket.

                    mrudella

                    Then I am unsure. It’s working for everyone else so it’s a config issue somewhere in your end.

                    Cheers.

                      KevinTheJedi As I said it's not working for us either, so it's definitely not working for "everyone else". Has anyone else confirmed specifically that SMTP works for them?