Fix Microsoft 365 Email Setup in Mac Mail and Gmail
Question details
Set up a Microsoft 365 mailbox in Mac Mail and Gmail when account verification fails.

- Product
- Microsoft 365 Exchange Online, Apple Mail, and Gmail
- Device & OS
- Mac and iPhone
- Scenario
- The user is adding a Microsoft 365 email account to Apple Mail on a Mac and the Gmail app on an iPhone.
- Observed behavior
- The account setup reports that it is unable to verify the account name or password, and the mailbox does not connect.
Confirm that you can sign in to your mailbox at outlook.office.com with your Microsoft 365 email address. Check whether your organization requires a verification prompt or has restrictions on third-party mail apps.
Re-add the Microsoft 365 account in Mac Mail
Use the Exchange account type and Microsoft's sign-in page to replace an incorrect or outdated account configuration.
On your Mac, open System Settings > Internet Accounts, select the affected account, and choose Delete Account. Do not remove an unrelated Google Workspace account.
Open Mail and choose Mail > Add Account. Select Microsoft Exchange, enter your name and Microsoft 365 email address, and continue.
Choose Sign In when prompted, enter your Microsoft 365 credentials on the Microsoft sign-in page, and complete any required verification prompts.
Select Mail in the account options and finish setup. Open Mail and check whether the mailbox appears and syncs.

Add the Microsoft 365 mailbox to Gmail on iPhone
Use this method if the same mailbox also fails to connect in the Gmail app.
Check authentication policies and the Mac Mail cache
Use these checks if re-adding the account does not resolve the error.
Work with Microsoft Office files in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for working with Office documents, spreadsheets, and presentations. Its format compatibility makes it easy to move files between office suites. It does not fix Microsoft 365 email authentication.

Frequently Asked Questions
Which account type should I choose for Microsoft 365 in Mac Mail?
In Mail, choose Mail > Add Account and select Microsoft Exchange. Use the Microsoft sign-in page and complete any verification prompts.
Why does Gmail on my iPhone show the same sign-in problem?
Gmail has its own account setup and does not use the Mac Mail cache. Check that you selected Exchange and Office 365 in Gmail, then ask your administrator whether third-party app access is allowed.
Where is the IMAP cache folder on my Mac?
In Finder, choose Go > Go to Folder and enter ~/Library/Mail. Folder names and layouts vary by macOS version, so you may see V-numbered folders rather than one named IMAP. Do not delete unknown folders.
Should I turn off two-step verification to add my mailbox?
Do not disable it as a troubleshooting shortcut. Complete the Microsoft verification prompt or ask your administrator whether your organization requires an app password or a different sign-in method.




