Hi @佳龙 张
Welcome to our forum!
What is your account? Outlook.com or something else?
What account type are you configuring? (IMAP/POP/Echange?)
As i know, Basic Authentication no longer available to access any Outlook account. If your Outlook is configured to connect to Outlook.com using POP or IMAP, Modern Authentication is not supported. This is a known issue.
Instead of using POP/IMAP and SMTP, it is suggested please create a new Outlook Desktop profile and then add your Outlook.com account using automatic account configuration, which will add the account with Modern Authentication. More information: Modern Authentication Methods now needed to continue syncing Outlook Email in non-Microsoft email apps - Microsoft Support
Please kindly understand that the Outlook tag here we mainly focus on general issues about Outlook desktop client. If you want to learn more about the code, please go to the forum with Office Development tag. In addition, here is the detailed settings used to verify IMAP/POP in the past, more: POP, IMAP, and SMTP settings for Outlook.com - Microsoft Support.
Hope it helps!
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.