Sure — I’ve added the server information as a separate section at the end.
OAuth2 Page Not Found
Hi,
I am new to this forum, and I hope I can solve my first problem with osTicket here :-)
I am part of a team, and we want to use osTicket to replace our old ticket system.
osTicket is already installed. In Azure, the App Registration and API permissions have been configured.
URL rewriting is enabled. However, the administrator of our hosting provider asked where /api/auth/oauth2 should redirect after returning from Microsoft.
After installing the OAuth2 plugin and configuring the mail settings, I am redirected to Microsoft to log in. After logging in, I have to select the Active Directory account/tenant to identify myself. Then I am asked whether I want to stay signed in for easier login.
After that, I get a "Page Not Found" error.
I don't even get to the page where I would expect osTicket to request/confirm the required permissions.
My configuration
IMAP:
- Server:
outlook.office365.com
- Port:
993
- Protocol:
IMAP
- Authentication:
OAuth2 - Microsoft
SMTP:
- Server:
smtp-mail.outlook.com
- Port:
587
OAuth2:
- Redirect URI:
https://xxx/api/auth/oauth2
- Client ID:
xxx
- Client Secret:
xxx
- Authorization Endpoint:
https://login.microsoftonline.com/xxx/oauth2/v2.0/authorize
- Token Endpoint:
https://login.microsoftonline.com/xxx/oauth2/v2.0/token
- Outlook Scopes:
offline_access https://outlook.office.com/IMAP.AccessAsUser.All https://outlook.office.com/SMTP.Send
I removed the POP scope because we don't need POP.
Plugin Instances:
- Resource Details Endpoint:
https://graph.microsoft.com/v1.0/me
- Email Address Attribute:
mail
Server Information
osTicket Version: v1.18.4 (8d38b06) — Current
Server Software: Apache/2.4.68 (FreeBSD) PHP/8.5.8 OpenSSL/3.5.6 mod_perl/2.0.13 Perl/v5.42.2
MySQL Version: 11.4.10
PHP Version: 8.5.8
Where can I check what is causing the problem?
Could the issue be related to the redirect URI or URL rewriting? Does /api/auth/oauth2 need to be configured separately on the web server/hosting side?
Any help or suggestions on where I should start troubleshooting would be greatly appreciated.
Thank you!