Sometimes Windows’ relationship with 365, or a user’s profile, or just a user on a PC, will not log into 365. This appears to be the result of corruption of cached credentials. To fix:
Remove 365 accounts from “Access Work and School”, then run these:
dsregcmd /cleanupaccounts
dsregcmd /debug /leave
from administrative CMD, and also from SYSTEM (paexec or psexec can do this), then reboot, then remove from Access Work and School if still there, then try your login.