Hi
Thank you for your quick response. I've tried the code changes and unfortunately, this didn't resolve the issue.
The problem only exists for Azure authentication. Also have open LDAP authentication enabled as an alternative method and it works fine. After authenticating using a direct link to a ticket, the agent is directed to that ticket. Using Azure authentication, the user is directed to the tickets listing /scp/index.php instead of that ticket.