Why would you ever choose to make the Callback Endpoint method the only option for your msgraph App Registration? So now I need an external IP for my server, a public DNS entry, and likely a purchased SSL cert just so osTicket can check one mailbox on O365 for incoming tickets. I have powershell scripts that do more, including checking a mailbox, without using the Callback Endpoint. The "Callback Endpoint" is unnecessary and will likely make a ton of osTicket installs useless. O365 does not need be able to initiate connections directly to the OST server for this to work. Are there plans to remediate this soon or should people just move on to another product?
GFY
No you don't...it can work with locahost URLs too. And callback url is necessary to get the Access/Refresh tokens from MS..
Cheers.
Here is a snippet directly from MS docs:
Your answer is "No you don't". Care to elaborate? How do you make it work with localhost URLs?
Simply change the Callback URL manually in osTicket to localhost, copy it from osTicket, and paste it into the Redirect URI field in the registered Application in Azure.
That is exactly what I already did...no go.
Then you probably didn't do something correctly. Here is my working Redirect URI for localhost and O365:
Uhm, so are you surfing your osTicket site on the actual server that is serving it out?
No, it’s hosted locally on my own computer (VM). The Redirect URL doesn’t need to be public at all as I mentioned you can use Localhost URLs.
Well this is great for a developer, but it really won't help anyone who is running osTicket on a server without the option of installing a GUI based browser.
Well, that’s not up to us. MS themselves require a valid domain or localhost addresses. If you have issues then you need to raise a ticket with MS.
Below are snippets directly from MS docs:
The authorization server sends the code or token to the redirect URI, so it's important you register the correct location as part of the app registration process. … Redirect URIs must begin with the scheme https. There are some exceptions for localhost redirect URIs.
Everything looks like it is successfully configure, yet no email, no errors either. Is there an error log for that Oauth plugin?
They would be logged in your PHP/webserver logs.
No errors to be seen unfortunately. The OAuth2 plugin is not functioning, there are no errors being generated, no mail is being fetched though. Kevin, is there anything else that we can try to troubleshoot this? Should we just start over from scratch and hope that whatever is wrong corrects itself?
Then are you sure you enabled Email Fetching at the email level and System level? Did you setup a cron job to poll the mailbox?
Yep everything is set as it should be. I even toggled the settings, tried disabling/enabling the plugin, reinstalling the plugin. It just seems to not be doing anything. I am not even seeing the failed mail fetches in the system logs. checked all the httpd logs...nada.
That is quite the conundrum. I cannot replicate this so I’m unsure what’s going on in your particular case. And did you check your PHP/webserver error logs to see if there is a fatal error being logged somewhere? You can also try running the cron manually via CLI to see if something is happening.
Not sure how this is possible but: Last error from the DB ost_email_account: osTicket\Mail\AccountSetting::setCredentials(): Argument #1 ($creds) must be of type osTicket\Mail\AuthCredentials, null given, called in /var/www/html/include/class.email.php on line 1013
How do you have outgoing mail configured? What does your Admin Panel > Emails > Settings page look like?
Hello, I have a similar problem with my server (Windows + IIS). Everything is correctly configured on the server as in Azure, but when sending the information it takes me to the user access page, not to the agent page. I have seen several servers go down, all of which were using O365, as was I. I have been reading all comments related to this for 2 weeks, but so far there is no solution. @KevinTheJedi I have read all your answers regarding this OAuth2 topic, but in all of them I get the same results. I send images of all the steps I do, but it always takes me to the user page. Any ideas what I could be doing wrong?
jorgesuazo
That means you do not have URL Rewriting enabled properly or most likely the web.config we ship with the software isn’t being loaded properly. You’ll need to figure out why the web.config isn’t being loaded properly. Someone else in the community shared how they got it working. You can search for this thread in the Forum.