Office 365 App passwords

It is no longer possible to re-enable Basic Auth or use App passwords.

First make sure IMAP/POP3/SMTP are turned on properly: enable IMAP / POP3 and SMTP in Office 365

To use App passwords, Multi-factor Authentication (MFA) must be turned on for the account.

On the other had, if you have MFA turned on for your account, App passwords are the simplest way to receive your emails – your primary password won’t work.

First log in to Microsoft 365 admin portal at as an administrator. Go to Users screen and click Mulit-factor authentication:

Select a user and change Mulit-factor Auth Status to Enforced:

Log in as this user to his My Account at, then go My sign-ins and create a new App password on the Security info screen:

Write down the created password (you won’t be able to see it again).

Have in mind it takes 20-30 minutes for the changes to take effect.

Remember to turn IMAP on for those Office 365 accounts as well, now you can now use it as a standard password:

using (Imap imap = new Imap())



    List<long> uids = imap.Search(Flag.Unseen);

    foreach (long uid in uids)
        IMail email = new MailBuilder()
        string subject = email.Subject;


You can find more details here as well:



Consider using our Q&A forum for asking questions.