Add my Microsoft 365 email in Thunderbird on Mac and Windows
Add your Microsoft 365 email to Thunderbird for Mac or Windows PC. Then you can send and receive emails from your Thunderbird client. Before continuing, make sure that you're using the latest version of Thunderbird.
Steps :
Open Thunderbird.

If you're a new user, skip to step 5. Otherwise, in the lower-left corner, select

Settings.
Select Account Settings.

Select Account Actions, and then Add Mail Account.

Enter Your full name and Email address, then select Continue.
If your server settings are detected, the server settings will be filled in automatically. Select Done, and then skip to step 9. Otherwise, continue to step 7.

Under INCOMING SERVER, make sure that the fields are as follows:
Protocol: IMAP
Hostname: outlook.office365.com
Port: 993
Connection security: SSL/TLS
Authentication method: OAuth2
Username: Your email address

Under OUTGOING SERVER, make sure that the fields are as follows:
Hostname: smtp.office365.com
Port: 587
Connection security: STARTTLS
Authentication method: OAuth2
Username: Your email address

If you're asked to grant permissions, select Accept. If you're an admin, select the checkbox next to Consent on behalf of your organization so your other users don't see this prompt.
Select Done.
If you get a pop-up about cookies being disabled or the sign in page does not load, change your settings to accept cookies.
Select the

Thunderbird Menu (or, in the upper-left corner, select Thunderbird), then Settings, and then Privacy & Security.
Next to Accept cookies from sites, select the checkbox, and then next to Send websites a "Do Not Track" signal that you don't want to be tracked, clear the checkbox.

Close and re-open Thunderbird, and then try adding your account again.
You might be prompted to enter your email password. Enter your password, and then select Sign In.

If you're on a Windows computer, you might be prompted to add a security exception. Select Confirm Security Exception.

You’ll see a confirmation when your account is successfully added to Thunderbird. Select Finish.
You can now use your Microsoft 365 email in Thunderbird.
