How to connect to outlook IMAP server programmatically?

Walid Balhaoui 0 Reputation points
2024-07-23T18:22:14.34+00:00

I have been working on this project for a while that uses IMAP and SMTP connections. For the past 3 weeks or so I have been working fine with basic password app. But today I cannot connect. After searching around, it seems like basic auth support has been getting phased out for a while. But I cannot figure out how to setup anything else. OAuth2 needs an azure registered application but I do not have access to a credit card for a free Azure account.

Thanks for the assistance.

Outlook
Outlook
A family of Microsoft email and calendar products.
3,998 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ChristyZhang-MSFT 23,896 Reputation points Microsoft Vendor
    2024-07-24T06:19:45.29+00:00

    Hi @Walid Balhaoui ,

    Welcome to our forum!

    What's your account? A Microsoft 365 account? If so, as i know, basic authentication is now disabled in all tenants and we need to enable Auth 2.0 to configure it in Outlook as IMAP. More information: Authenticate an IMAP, POP or SMTP connection using OAuth.

    If you have any problems creating an Azure subscription, please kindly understand that the Outlook tag here we mainly focus on general issues about Outlook desktop client, it's suggested that you could create a new thread and post your issue with Azure related tag.

    From an Exchange perspective, we recommend that users can configure accounts as Exchange instead of IMAP in Outlook desktop client. In this way, except syncing mail like an IMAP account, we can also sync other information such as calendar items, contacts, tasks, etc.

    If your program can be changed to a different protocol connection, you can also change it to one of these types: POP, IMAP, and SMTP AUTH.

    Hope the above help!


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.