ZSD Microsoft 365 OAuth Issues

Hello,

We attempted to go live with our support mailbox over the weekend and repeatedly ran into issues with the configuration and getting tokens. We are met with the following error message:



Looking in the LiveTime.log, we see the following when attempting to get tokens:


[2024-08-12T07:17:01,974]ERROR762505[LiveTimeScheduler_Worker-4] (OAuthTokenUtility.java:166) - An error occurred while getting the token
org.json.JSONException: A JSONObject text must begin with '{' at character 0 of
at org.json.JSONTokener.syntaxError(JSONTokener.java:448) ~[json-1.0.jar:?]
at org.json.JSONObject.<init>(JSONObject.java:178) ~[json-1.0.jar:?]
at org.json.JSONObject.<init>(JSONObject.java:275) ~[json-1.0.jar:?]
at com.livetime.auth.OAuthTokenUtility.retrieveTokenFromResponse(OAuthTokenUtility.java:177) ~[livetime-24.3.0.jar:?]
at com.livetime.auth.OAuthTokenUtility.retrieveTokensFromProviderEndpoint(OAuthTokenUtility.java:157) ~[livetime-24.3.0.jar:?]
at com.livetime.auth.OAuthTokenUtility.refreshTokens(OAuthTokenUtility.java:99) ~[livetime-24.3.0.jar:?]
at com.livetime.mail.EmailReader.authenticateForOauthReceiver(EmailReader.java:307) ~[livetime-24.3.0.jar:?]
at com.livetime.mail.EmailReader.authenticate(EmailReader.java:253) ~[livetime-24.3.0.jar:?]
at com.livetime.mail.EmailReader.getPendingMessages(EmailReader.java:328) ~[livetime-24.3.0.jar:?]
at com.livetime.mail.EmailReader.autoResponder(EmailReader.java:585) ~[livetime-24.3.0.jar:?]
at com.livetime.service.EmailReaderService.execute(EmailReaderService.java:64) ~[livetime-24.3.0.jar:?]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ~[quartz-2.3.2.jar:?]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) ~[quartz-2.3.2.jar:?]
[2024-08-12T07:17:01,974] WARN762505[LiveTimeScheduler_Worker-4] (EmailReader.java:262) - Error connecting to host: An error occurred while getting the token from the provider

We were able to generate the tokens manually and then drop into ZSD's setup but these only work until the tokens expire ~5000 seconds.

We attempted to use MS Modern Auth but also ran into issues we believe because of SAML/federated account. Our previously dev account was a onmicrosoft.com account and worked successfully with MS Modern Auth but had same behavior with OAuth.

Please advise asap. Let me know if you need any other information. 

Version: 24.3