Hello there!
I'm trying to setup osTicket v1.17+oauth2 plugin on a new Ubuntu server 22.04 so i followed the guide on the osticket site and everything seems to work fine, except for the final redirection, which keeps giving me a "404 Not Found. The requested URL was not found on this server" error.
Access logs on the MSAzure side are ok, i can see login operations completed; this is what i see in the /var/log/apache2/osticketaccess.log:
::1 - - [21/Nov/2022:16:08:04 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.52 (Ubuntu) (internal dummy connection)"
192.168.12.1 - - [21/Nov/2022:16:08:10 +0000] "GET /osticket/api/auth/oauth2?code=0.AXQACb5jlqlKNkysa3Z4tXWUZSLIx-q2RWZNnJPKZm5dIYJ0AAA.AgABAAIAAAD--DLA3VO7QrddgJg7WevrAgDs_wQA9P9J55f5a-QMmMNakQ1FrcgvIF_pZfKGo2Ru3kIEnljIcFPHA2m1BdoYaJYLnSK3HVNk4vNPvl3cxA10-wV1PcLvLtGUD_W0spyw1Rygb7RkHQxTFzFTPrmFpAsQ7M53bAPrvn9u6BWDbqO2UwLJI3oMpLS5XJ8X2Lk9oona4-Uv6tjF7iKyQPhPHxTLcfkeiOouzhjiwGq3vg2IWbPMHQpQBDwLTrO_vCqc_y9jaFG6cdhbBY66DUg50rqxjfOq8QbZh9AF0XK4rOq5a4qeZofA_GRZu3yR59Hy133_rv9B428w2UPrEKiyel8HU730lto9MXf4zZqSkVIOq_jsEFkHYTQJL-G7r_edItMzYkeN5A7P7viaUVilAlfIzZ4aajjoTzrM5HxrtM25m_sdBxwJ3ZMv3uaGhA7QWHpGWFdlAMEEat0gKL709iIpya8e7JMXWMUkmfS9vDKQ3q3dzaHWr4Y-EFUhEksZlFNIh_0eUMZRsJaMQUBlnjZAmgzjKjo1d_GlaWGkutsxjN69remp2beD1rH8qwm5BJBLD5e7K-uZPRnqfZCW4FE_sbPRGSQpqpqljiBHyoYbkLlutKKJrUrfxcUHuSVIXg7EFErXyNS1yC_cX5DUCMDfHOEiVPsJsyiO_stSc&state=a8ec2e7b28a20841438b9530e2d4206c&session_state=3f4592f7-459f-4d42-9ff8-7f5e925fc795 HTTP/1.1" 404 494 "https://login.microsoftonline.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
192.168.12.1 - - [21/Nov/2022:16:08:10 +0000] "GET /favicon.ico HTTP/1.1" 404 493 "https://support.spvl.it/osticket/api/auth/oauth2?code=0.AXQACb5jlqlKNkysa3Z4tXWUZSLIx-q2RWZNnJPKZm5dIYJ0AAA.AgABAAIAAAD--DLA3VO7QrddgJg7WevrAgDs_wQA9P9J55f5a-QMmMNakQ1FrcgvIF_pZfKGo2Ru3kIEnljIcFPHA2m1BdoYaJYLnSK3HVNk4vNPvl3cxA10-wV1PcLvLtGUD_W0spyw1Rygb7RkHQxTFzFTPrmFpAsQ7M53bAPrvn9u6BWDbqO2UwLJI3oMpLS5XJ8X2Lk9oona4-Uv6tjF7iKyQPhPHxTLcfkeiOouzhjiwGq3vg2IWbPMHQpQBDwLTrO_vCqc_y9jaFG6cdhbBY66DUg50rqxjfOq8QbZh9AF0XK4rOq5a4qeZofA_GRZu3yR59Hy133_rv9B428w2UPrEKiyel8HU730lto9MXf4zZqSkVIOq_jsEFkHYTQJL-G7r_edItMzYkeN5A7P7viaUVilAlfIzZ4aajjoTzrM5HxrtM25m_sdBxwJ3ZMv3uaGhA7QWHpGWFdlAMEEat0gKL70__9iIpya8e7JMXWMUkmfS9vDKQ3q3dzaHWr4Y-EFUhEksZlFNIh_0eUMZRsJaMQUBlnjZAmgzjKjo1d_GlaWGkutsxjN69remp2beD1rH8qwm5BJBLD5e7K-uZPRnqfZCW4FE_sbPRGSQpqpqljiBHyoYbkLlutKKJrUrfxcUHuSVIXg7EFErXyNS1yC_cX5DUCMDfHOEiVPsJsyiO_stSc&state=a8ec2e7b28a20841438b9530e2d4206c&session_state=3f4592f7-459f-4d42-9ff8-7f5e925fc795" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"!<
Nothing is showing in the Osticket reports/system logs menu, and this is my osticket infos:

I also read that apache2 needs the apache mod_rewrite module so i installed it and granted permissions pretty much everywhere, just to be sure, and set AllowOverride All in htaccess files.
I cannot really say if a webpage of some sort it's expected in the redirection Url ( https://myhelpdesk/osticket/api/auth/oauth2), but it's what it seems to me.
So, basically: i can reach the osticket login page where i find the Azure login button. When i try to log in i'm getting redirected to the MS account credential page where i can log in without problems, than i get redirected to https://myhelpdesk/osticket/api/auth/oauth2 but with the "404 Not Found" error message.
I tried to delete and register again the app in the azure administration interface 3 times, with single tenant and mutitenant configuration, and two of my collegues checked the configurations in osticket and Azure multiple times but it's all correct.
What can I do now to understand where the problem is?
Thanks in advance!