@KevinTheJedi
I am not dumb either I would say, so I found the error now and this error is pretty dumb. It is not the fckn version, does not matter if it is modded or the core osTicket. It does not matter if language packs are installed or not or any other plugins. The fckn error was the "T" of osTicket. Like I spent literally many, many hours with this mistake, installed it over and over again.
The problem is the following:
As mentioned in the instructions, when you download the core osTicket you take the upload folder and copy it into inetpub\wwwroot. Then, because "upload" is not a nice name, I renamed it to osTicket, like mentioned in the instructions - with a big "T".
So when I configured the redirect URL for the OAuth2 plugin, I made sure to write it with a big "T" like "https://....../osTicket/oauth..."
The thing is, somehow the webserver is normally not case sensitive, but the security algorithm behind OAuth2 is, in a kind of weird way. With a big T in osTicket it gives me an error. But when I configure the redirect URI in osTicket and Azure with a small t like "osticket", it all works fine, even though the folder is written with a big "T".
Learnings:
Always write such things like folder names and so on with small letters.
I hope this helps anyone who might face the same issue.
With best regards,
Xeon