Dezra
So you use IONOS? Can you reach out to them to see if they have a firewall or anything in the way? They would usually have logs you can look at to see if a request is being dropped or blocked or whatever. One thing to look out for is ModSecurity or other firewalls. They have a tendency to block or drop URLs/requests that hit certain rules. You can usually add exceptions solely for that one site to get it working again.
The fact that it redirects to the homepage is suspicious though. I’ve seen this happen for a multitude of reasons but most of the time it’s user info (attributes/claim names) mismatch or misconfigured plugin. However at least from what you shared everything appears correct thus far. There could be something going on in the Microsoft side like the user needs to be added to the app or something.
Can you also confirm with IONOS that URL rewriting is installed on the webserver and enabled for your site? That’s required for OAuth2 100%. We use .htaccess files to be able to capture the callback urls and map them accordingly. If you don’t have Apache or LiteSpeed and you use NGINX then that could be a problem as well. If you don’t manually add the OAuth2 rewrite blocks in the NGINX site config then osTicket won’t know what to do with the callback url. NGINX doesn’t use .htaccess files (or the web.config files like Windows IIS) and requires manual configuration.
Cheers.