Hi Андрей Михалевский,
Thank you for posting your question in the Microsoft Q&A forum.
In general, Outlook uses Autodiscover service to obtain configuration information for Exchange server, then could connect Exchange with MAPI/HTTP.
Based on your description, “If I select - configure manually and select Exchange - Outlook is configured via MAPI”, do you mean you have to choose the mailbox type and Outlook could setup successfully?
If so, it seems that Exchange Autodiscover service still works. Here are some suggestions and information for further troubleshooting:
- Do you have pure on-prem Exchange server environment, or have Exchange Online and add the domain in M365? Outlook may retrieve the Autodiscover payload from the known O365 endpoints. If you have O365 in your organization, this could cause O365 login page prompts up for your on-prem Exchange mailbox or Autodiscover may fail if something else interrupt the process. You can check this article for more information about Outlook Autodiscover: Outlook 2016 implementation of Autodiscover - Microsoft Support
- You can try the following registry value to prevent Outlook from checking for O365 as priority. Important: Follow the steps in this section carefully. Serious problems might occur if you modify the registry incorrectly. Before you modify it, back up the registry for restoration in case problems occur.
- Open the Registry Editor by typing regedit in the Windows Search or open the run and type regedit.exe.
- Find this location below in the regedit: HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\AutoDiscover
- Create a DWORD (32-bit) value for ExcludeExplicitO365Endpoint and change the value to “1” to enable it.
- Then close Registry Editor and reopen Outlook to setup mailbox.
For more details, please check: Unexpected Autodiscover behavior if settings under the \Autodiscover key | Microsoft Learn
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.