Hello,
I do have the exact same problem with a very similar configuration (Osticket in a subdomain hosted by OVH and trying to log in via MS account).
The result is the same for me "File not found":
I tried to change .htaccess in api folder and was able to redirect to a fake page home.php with R flag
Result :
If I change it back to /http.php/ I'm redirected to my homepage of osticket but not logged in
(FYI : This is the same behaviour as if I manually change the url adding /http.php/ after the error "File not found.")
I don't know if this helps but I am adding my own experiments 😉
Thank You !