Just thought I'd throw my findings in the ring here. I updated OsTicket yesterday and setup the Oauth plugin. We had the issue where an agent signs in, and it redirects to the homepage. I knew it wasn't a problem with the setup as it worked fine for me, and at least one other agent, just not the rest. I checked the email fields matched up and was stumped otherwise. As a last resort, I went to assign the user a password so they could login locally. They were told they had maxed out their attempts so I thought I'd solved the issue! I changed the maximum attempt fields and the user then got an "Access denied" message. I went to the user account and changed it from "Use any available backend" to "Local authentication". User could sign in. Then I thought I wonder what happens if I change it to use "Microsoft" authentication, and then it worked!. The strange thing is, everyone is setup to "Use any available backend" and as I said, it works for at least 2 of us.
We previously used the LDAP plugin and whether this had some kind of effect on things, I don't know. It was disabled before I changed the authentication over anyway. Hopefully this might help other people who are in my position!