Are you using Pro or Enterprise?
Apparently the Home version does not work with office365 accounts
Though this is more basic I would try the usual recovery steps:
- Reset your password
- Make sure your account isn't blocked
- Remove any antivirus software.
- Install the latest updates.
- Make sure there are no group policies blocking the account.