تخطَّ إلى المحتوى
Are you a product supplier? Contact us.
M Mall of Accs

Hotmail IMAP Not Working? Read Outlook Mail With OAuth2

5 min read Mall of Accs Editorial Team Updated:

Reading Hotmail and Outlook mail from software with IMAP or OAuth2: what the refresh token is, why IMAP fails and which settings you need.

If you need to read verification emails automatically — for sign-ups, testing or support tools — Hotmail and Outlook accounts can be opened by software in two ways: classic IMAP with the password, or OAuth2 with a refresh token. The product title tells you which one is included.

IMAP settings

  • Server: outlook.office365.com, port 993, SSL/TLS.
  • Username: the full email address; password: the account password from the delivery.
  • Some accounts only allow IMAP after a normal web login; sign in once at outlook.live.com if the first IMAP attempt fails.

OAuth2 refresh token

Microsoft increasingly blocks password-based IMAP. With OAuth2, your software exchanges the refresh token (plus the client ID given in the delivery) for a short-lived access token and signs in with XOAUTH2 — no password involved.

Treat the refresh token like a password: whoever has it can read the mailbox. Do not paste it into public tools.

Common errors

  • "Authentication failed" with IMAP: the account needs OAuth2 or a first web login.
  • "invalid_grant" with OAuth2: the token was revoked, usually after a password change — change the password only after you have stored a fresh token.
  • Too many connections: open one IMAP connection per account and reuse it.

Concepts in this article

IMAP POP3 OAuth2 Microsoft Graph refresh token basic authentication

Frequently asked questions

Are Hotmail and Outlook the same?

Yes — both are Microsoft accounts with the same login system; only the domain differs.

Does the token expire?

Refresh tokens stay valid for a long time if they are used regularly; a password change or long inactivity can revoke them.

About this article

Mall of Accs Editorial Team

Mall of Accs Editorial Team is the content team behind Mall of Accs. Every article is written from the delivery formats of the products we sell and the questions customers actually ask, and is reviewed again at each update. Platforms change their own rules — check the delivery format on the product page before you buy.

Related categories

Related articles

All articles →

The account or licence you need is here

Main-provider prices, instant delivery and a replacement guarantee.