We've just upgraded from 1.15.6 (also for OAuth support for O365 emails) to 1.17 and run into the same issue; UPN logins for users are no longer working, only sAMAccountName works now.
UPDATE: Additionally, it appears that if a user used their email address at the first login, that is what got recorded for 'username' in the 'ost_user_account' table of the database. I have had to change these to their sAMAccountName to allow login.