So far no luck. I will try to explain it once more.
Under the Oath2 settings. At the URL part it doesn't matter if I write down http://localhost/api/auth/oauth2 or https://osticket-2022-1.msappproxy.net/api/auth/oauth2.
Once I click submit I'm directed to a page to accept the permissions for the application
Permissions requested
2022-1-osticket
*.com
This application is not published by Microsoft.
This app would like to:
Read and write access to your mail.
Maintain access to data you have given it access to
Read and write access to your mail.
Access to sending emails from your mailbox.
Sign you in and read your profile
Accepting these permissions means that you allow this app to use your data as specified in their terms of service and privacy statement. You can change these permissions at https://myapps.microsoft.com. Show details
Does this app look suspicious? Report it here
Once I click the Accept button the message I get is as follows.
Not Found
The requested URL was not found on this server.