How to manually configure Exchange or Microsoft 365 account in Outlook 365/2019/2016? , Ranjan.info

Modern versions of Outlook (starting with Outlook 2016) do not allow you to manually configure connections to mailboxes hosted on Exchange Server or Exchange Online (Microsoft 365). Microsoft developers believe that Outlook should always use the Autodiscover mechanism to automatically discover the connection settings for Exchange mailboxes.

In this article, we will show you how to manually set up a connection to a mailbox on on-premises Exchange Server or Microsoft 365 (Office 365 or Exchange Online) using a local XML file in Outlook 2019/2016 or Outlook 365 . Required connection information is included. If autodiscovery cannot be performed (autodiscover is not configured correctly, autodiscover.xml file is not available, internet access is limited, proxy or VPN connection is used to access internal Exchange Server) then this method will help you will help you configure the Outlook connection to the mailbox. , e.t.c.) .

Comment. Of course, first, we recommend that you correctly configure Autodiscover for your domain, both for external and internal clients. If you cannot configure Autodiscover properly, you should use this guide to set up Outlook connection manually.

Method 1. Native XML Redirect for Outlook Client

  1. If you know the URL to access your Exchange via OWA, check if the following URL address is available: (You must authenticate to access the XML file). If the file is available, go to the next step. If not, go to the second method; try to open autodiscover.xml on exchange
  2. Create a custom XML file on your computer’s local disk that will redirect Outlook to the URL containing the autodiscover.xml file. create a text file autodiscover.xml containing the following text and save it in a local directory on your computer (for example, C:\Autodiscover\autodiscover.xml);

    <ऑटोडिस्कवर xmlns =”http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006″>
    <प्रतिक्रिया xmlns =”http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a”>
    <खाता>
    <खाता प्रकार>E-mail
    <एक्शन>redirecturl



    Comment, Replace the value in the RedirectUrl parameter with the Autodiscover URL for your domain.

  3. open registry editor and go to reg key HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Outlook\AutoDiscover, create a new REG_NO Registry parameter with the name of your domain and a value containing the path to the local XML file you created in the previous step. For example:
    parameter name, woshub.com
    value, C:\Autodiscover\autodiscover.xml
    then create one Prefer LocalXML (REG_DWORD) with the value of the parameter 1, After that, Outlook will always look in your local autodiscover.xml file first when performing autodiscover;
    PreferenceLocalXML registry option for Outlook 2019/2016
  4. just start outlook and run add account Magician. Enter your mailbox name, email address, and password. If you’ve done everything correctly, Outlook will automatically configure the Exchange mailbox connection. Manually Configure Exchange Account in Outlook 2016

Method 2. Local Autodiscover.XML file with Exchange connection settings

If the URL containing autodiscover.xml is not available from your computer, you must manually create a local XML file containing full user settings to connect to Exchange Server or Microsoft 365 mailboxes. You can obtain sample parameters for this file from a configured Outlook client. To do this, go to the folder C:\Users\%username%\AppData\Local\Microsoft\Outlookwhere you will find a file named [longGUID]-autodiscover.xml,

Outlook Profi Autodiscover.xml Example

Copy this file, change account settings if necessary and save it C:\autodiscover\autodiscover.xml, Then follow step 3 and 4 from the first method.

If you cannot find this file, you can create it manually. The file should have the following format.

If you are using Outlook Anywhere (RPC/HTTP)


<ऑटोडिस्कवर xmlns =”http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006″>
<प्रतिक्रिया xmlns =”http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a”>
<उपयोगकर्ता>
<ऑटोडिस्कवरएसएमटीपीएड्रेस>[SMTP_ADDRESS]
<लिगेसीडीएन>[USER_LEGACYDN]

<खाता>
<खाता प्रकार>E-mail
<एक्शन>Settings
<प्रोटोकॉल>
<प्रकार>Exchange
<सर्वर>[SERVER_NAME]
<सर्वरडीएन>[SERVER_DN]
<प्रमाणिक पैकेज>[RPC_AUTH_PACKAGE]

<प्रोटोकॉल>
<टाइप>xpr
<सर्वर>[OUTLOOK_ANYWHERE_SERVER]
<एसएसएल>Working
<प्रमाणिक पैकेज>[HTTP_AUTH_PACKAGE]
Feather
<सर्टिफिकेटप्रिंसिपलनाम>[CERTIFICATE_PRINCIPAL_NAME]
off



If you connect without Outlook Anywhere:


<ऑटोडिस्कवर xmlns =”http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006″>
<प्रतिक्रिया xmlns =”http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a”>
<उपयोगकर्ता>
<ऑटोडिस्कवरएसएमटीपीएड्रेस>[SMTP_ADDRESS]
<लिगेसीडीएन>[USER_LEGACYDN]

<खाता>
<खाता प्रकार>E-mail
<एक्शन>Settings
<प्रोटोकॉल>
<प्रकार>Exchange
<सर्वर>[SERVER_NAME]
<सर्वरडीएन>[SERVER_DN]
<प्रमाणिक पैकेज>[RPC_AUTH_PACKAGE]



Change the parameters in square brackets in these XML files to the information that corresponds to your domain (you can obtain this from your Exchange or AD administrator).

Method 3. Example Autodiscover.XML file for Microsoft 365 (Exchange Online)

If you want to manually connect mailbox to Microsoft 365 (Exchange Online) in Outlook 365/2019/2016, you can get all required mailbox settings for local autodiscover.xml file using PowerShell.

Connect to your EOL tenant by using the Exchange Online PowerShell v2 module:

Connect-ExchangeOnline -UserPrincipalName [email protected] -ShowProgress $true

Get user mailbox settings with the command:

Get-Mailbox -Identity maxbak | select DisplayName,LegacyExchangeDN,PrimarySmtpAddress,ExchangeGuid|fl

Get Exchange Mailbox Properties Using PowerShell

The following is an example of an Autodiscover.xml file for an Exchange Online (Microsoft 365) mailbox. Replace the highlighted parameters with the attribute values ​​you got using PowerShell:

<?xml version="1.0" encoding="utf-8"?>
<Autodiscover xmlns="
<Response xmlns="
<User>
<DisplayName> [DisplayName] </DisplayName>
<LegacyDN>[LegacyExchangeDN] </LegacyDN>
<AutoDiscoverSMTPAddress>[PrimarySmtpAddress] </AutoDiscoverSMTPAddress>
<DeploymentId>1234</DeploymentId>
</User>
<Account>
<AccountType>email</AccountType>
<Action>settings</Action>
<MicrosoftOnline>True</MicrosoftOnline>
<ConsumerMailbox>False</ConsumerMailbox>
<Protocol Type="mapiHttp" Version="1">
<MailStore>
<ExternalUrl>https://outlook.office365.com/mapi/emsmdb/?MailboxId=[ExchangeGuid]@woshub.com</ExternalUrl>
</MailStore>
<AddressBook>
<ExternalUrl>https://outlook.office365.com/mapi/nspi/?MailboxId=[ExchangeGuid]@woshub.com</ExternalUrl>
</AddressBook>
</Protocol>
<Protocol>
<Type>WEB</Type>
<Internal>
<OWAUrl AuthenticationMethod="LiveIdFba, OAuth">
<Protocol>
<Type>EXCH</Type>
<ASUrl>
</Protocol>
</Internal>
<External>
<OWAUrl AuthenticationMethod="Fba">https://outlook.office365.com/owa/woshub.com/</OWAUrl>
<Protocol>
<Type>EXPR</Type>
<ASUrl>
</Protocol>
</External>
</Protocol>
<Protocol>
<Type>EXHTTP</Type>
<Server>outlook.office365.com</Server>
<SSL>On</SSL>
<AuthPackage>Basic</AuthPackage>
<ServerExclusiveConnect>On</ServerExclusiveConnect>
</Protocol>
</Account>
</Response>
</Autodiscover>

local autodoscover.xml file example

save file as C:\Autodiscover\autodiscover.xm, Then make changes to the registry as described in Method 1 -> Steps 3 and 4. Restart Outlook after adding the new user account.

You should see the Microsoft 365 Modern authentication prompt the first time you open it. Enter your username and password. If the user is enabled for MFA in Microsoft 365, verify the sign-in with a second factor.

If you see a blank Office 365 sign-in window when you start Outlook, you can resolve the issue by following this guide.

Modern Microsoft 365 sign-in prompt in Outlook

Your Outlook should be connected to the Exchange mailbox, and you will see a list of mailbox folders and e-mail items.

Leave a Comment