I have osTicket 1.17.2 installed and Azure is working for authentication & email fetching. When an agent clicks on a link to a ticket in an email generated by osTicket, if they are not logged in, they are prompted to authenticate. After successfully logging in using Azure (oauth), they are redirected to the tickets listing page (/scp/index.php) and not directly to the ticket. If the agent was already successfully logged in prior to clicking on the ticket link in the email, the link works just fine.
Is there a way after the user authenticates in Azure, to be redirected to the URL they initially accessed? This way when clicking on a direct link to a ticket in an email, after authenticating in Azure (if not logged in), the agent is taken to the direct link to the ticket.