As of October 1st, 2022, basic authentication (username and password) does not work when trying to connect to Microsoft accounts. Moving forward, you need to create an App Specific password for Aid4Mail or use the Graph API option to connect with a Microsoft account. Once you create an app password, use the app password in the "password" field in Aid4Mail.
Also please refer to the following articles for more assistance:
Cannot connect with Office365 account via IMAP
https://support.microsoft.com/en-us/help/12408/microsoft-account-about-two-step-verification
You also may need to make sure the following settings are correct for the account:
1. The account needs to be configured to allow IMAP access.
Individual Office365 users can make this update themselves but for those with a company account, the IMAP enablement will need to be completed by an IT administrator. To allow IMAP access on Office365, go to the Exchange Control Panel, click on "mailbox features" and enable IMAP from there.
2. The account needs to be configured to "Allow less secure apps". IMAP is considered "less secure". https://support.office.com/en-us/article/Turning-Integrated-Apps-on-or-off-7e453a40-66df-44ab-92a1-96786cb7fb34