Imap sensor - one email works the other does not

I’ve had two imap sensors working for a very long time but a few months back one of them went unavailable. I’ve checked all the credentials and everything is correct. Logs don’t show any issues and i’m struggling to troubleshoot this. Any ideas?

config for the imap with issues:

- platform: imap
  server: outlook.office365.com
  port: 993
  charset: US-ASCII
  username: REDACTED
  password: REDACTED

edit: I just deleted the configs from config.yaml and added the via the integration page. The email that works added ok but the problem email acount says authentication error but the details provided are accurate.

@Jakesa
did you find the solution ?
I’ve just found the same problem

Autoreply, after some days dealing with this problem, with a new app password but it didn´t worked.
I’ve tried again and now it works, i don’t know why

You can’t use IMAP to access Microsoft’s servers with an address with a custom domain.