Not contributing much to the convo, but thought I'd chime in with I'm also getting the "invalid_client" issue. Have followed all of the advice here, still hitting it. Will try unpacking that .phar and trying those edits @jerer has mentioned tomorrow. It's been a long day with other "sinking ship" items 😅

Context: Running this in a fairly large enterprise Azure tenant w/ hybrid mail. If anyone needs me to test things on the Azure end, let me know.

I am also getting "invalid_client" with the plugin. Im pulling my hair out on this one!! haha

Here is my OAuth2 app settings:

Here is my endpoint from Azure:

Here is my Client ID:

Here is my Secret ID:

My Redirect:

My Permissions:

Hi, Also getting "invalid_client" when saving Auth2 Config, but when I enable email fetching Error changes to "Configure Authentication"


Is there a link to the v2 oauth2.phar file?

I've tried to follow the instructions on github but I'm hitting some errors

    Andy_B

    No, we will build and provide the new plugin once RC2 is released. You are welcome to get the source code for the plugin and hydrate and build it yourself.

    Cheers.

    @KevinTheJedi Is Outlook v2.0 API being deprecated (and decommissioned soon) going to be addressed in RC2/stable?

    • I think the API usage could be made optional since it shouldn't be really needed when used for IMAP/POP/SMTP.
    • The alternative is to use Graph API, but this requires getting another access token because Microsoft doesn't support Graph+outlook.office.com scopes in a single access token.

      jerer

      For now just Modern Auth via IMAP/POP and SMTP protocols. If they restrict fetching to the graph api then people are screwed. If that’s the case then you’d need a library/sdk for every provider to use their specific API which is not feasible. They should allow IMAP/POP and SMTP protocols for OAuth2. Unless I’m misinterpreting what you are saying.

      Cheers.

        KevinTheJedi

        What I mean is Microsoft has deprecated the https://outlook.office.com/api/v2.0 APIs, but https://outlook.office.com/IMAP...ETC scopes (not Graph) needs to be used for IMAP/SMTP/POP XOAUTH2 to work. AFAIK, Microsoft has not announced any changes coming to the IMAP/SMTP/POP scopes.

        So yes Graph APIs are the replacement for https://outlook.office.com/api/v2.0, but the problem is the Graph APIs cannot be used with the same access token we use for https://outlook.office.com/IMAP/SMTP/POP scopes.

        https://stackoverflow.com/a/61678485
        https://stackoverflow.com/a/65289990

        https://docs.microsoft.com/en-us/answers/questions/700838/%EF%BD%87%EF%BD%85%EF%BD%94%EF%BD%95%EF%BD%93%EF%BD%85%EF%BD%92%EF%BD%89%EF%BD%8E%EF%BD%86%EF%BD%8F%EF%BD%92%EF%BD%85%EF%BD%93%EF%BD%94%EF%BD%81%EF%BD%90%EF%BD%89%EF%BD%92%EF%BD%85%EF%BD%93%EF%BD%90%EF%BD%8F%EF%BD%8E%EF%BD%93%EF%BD%85%EF%BD%97%EF%BD%89%EF%BD%94%EF%BD%88%EF%BD%97%EF%BD%89%EF%BD%94%EF%BD%88%EF%BD%93%EF%BD%83%EF%BD%8F%EF%BD%90%EF%BD%85openid-prof.html

        I hope this makes it more clear what I'm concerned about.

          jerer

          I see. I think we are going to cross that bridge when we get closer. For now we are making v1.17 stable and then look at the outlook api url deprecation.

          Cheers.

          Just a heads up. As of yesterday, Microsoft prematurely disabled basic authentication on our O365 tenant. This caused IMAP mail fetching to stop working in osTicket. Although this isn't supposed to be deprecated until October. After talking with Microsoft support, supposedly they made a mistake while testing, and they disabled basic auth on many O365 tenants across the globe. I saw a lot of complaints on this all over the internet yesterday. They were able to assist with turning basic authentication back on, but warned it may be shut off again before October.

          Anyways, just wanted to give everyone a heads up, and hoping for a stable release soon!

          alexbuckland
          I'm trying to accomplish this with ZohoMail which is also a cheapo $1 per month mail service. I'm trying to figure out how to set this up. I have ZohoMail pulling data from Microsoft using Imap and that works fine. But I cannot figure out how to setup OsTicket to fetch mail from Zoho Mail. ZohoMail is just a client like Microsoft Outlook, so I don't know what to put for servername, port, etc.
          Can you please provide some insight on how you set this up with your Fast Hosts?

          Sure. I simply forwarded email from mailbox where the support requests came into. This was setup on 365 (obviously), but before I could turn on forwarding I had to enable it on my tenant, it seems to be turned off by default - you can enable a rule for an individual mailbox or all users here: https://protection.office.com/antispam

          Once the email was forwarding I reconnected osticket to the new simple mailbox which allowed pop3 collection.

          For sending email, I left this with 365 as SMTP auth seems to still work ok.

          nerdyviking88

          Should be released in a couple of minutes. Updating our site now to serve the new build (RC2).

          Cheers.

          Everyone,

          There is a new build labeled RC2 as well as a new build of the OAuth2 plugin. You will need RC2 AND the new build of the plugin to get all of the latest patches/fixes.

          Cheers.

          Updated to RC2, applied new oauth plugin. Still am getting "invalid_client". I also grabbed the source code for the .php files and made the edits @jerer mentioned, and then hydrated the .phar file. Still getting "invalid_client". Will continue to tinker!

            KevinTheJedi

            Hi Kevin,
            I've successfully configure the OAuth2. But when ever I'm trying to enable the email fetching it give me connection close error
            Please find the Screen shot below.

              korali

              Sounds like the outlook server didn't respond correctly or you're having network issues or something. Maybe reach out to your hosting provider/system's administrator and/or MS for further assistance?

              Also, what URLs and Scopes are you using?

              Cheers.