{"id":3240,"date":"2026-10-26T11:05:25","date_gmt":"2026-10-26T09:05:25","guid":{"rendered":"https:\/\/itsimple.info\/?p=3240"},"modified":"2026-10-26T11:14:05","modified_gmt":"2026-10-26T09:14:05","slug":"how-to-setup-local-xml-to-point-autodiscover-to-on-prem-exchange","status":"publish","type":"post","link":"https:\/\/itsimple.info\/?p=3240","title":{"rendered":"How to setup local Autodiscover XML file to points to On-Prem Exchange solving office 365 persistence redirecting Autodiscover URL to the cloud."},"content":{"rendered":"\n<!-- ============================================================\n  WordPress: paste into a single \"Custom HTML\" block.\n  Replace https:\/\/itsimple.info\/wp-content\/uploads\/2026\/10\/Outlook-Local-Autodiscover.zip with the uploaded ZIP URL.\n  Suggested title: Force Outlook to Use On-Prem Exchange Autodiscover with a Local XML File\n============================================================= -->\n<style>\n.isad{--ink:#1f2933;--mut:#52606d;--line:#d9e2ec;--bg:#ffffff;--soft:#f5f7fa;--acc:#0b6bcb;--acc-soft:#e6f0fa;--warn:#8a5a00;--warn-soft:#fff6e0;--ok:#16794c;--ok-soft:#e5f6ee;--code:#0f172a;--code-ink:#e2e8f0;\n  color:var(--ink);background:var(--bg);font-size:17px;line-height:1.65;max-width:860px;margin:0 auto}\n.isad *{box-sizing:border-box}\n.isad h2{font-size:1.5em;margin:2em 0 .6em;padding-bottom:.3em;border-bottom:2px solid var(--line)}\n.isad h3{font-size:1.15em;margin:1.6em 0 .5em}\n.isad p,.isad li{color:var(--ink)}\n.isad .lead{font-size:1.08em;color:var(--mut)}\n.isad code{font-family:Consolas,\"Courier New\",monospace;font-size:.9em;background:var(--soft);border:1px solid var(--line);border-radius:4px;padding:.05em .35em;word-break:break-word}\n.isad .pre{position:relative;margin:1em 0 1.4em}\n.isad pre{background:var(--code);color:var(--code-ink);font-family:Consolas,\"Courier New\",monospace;font-size:14px;line-height:1.5;padding:16px 18px;border-radius:8px;overflow-x:auto;margin:0;white-space:pre}\n.isad pre code{background:none;border:0;padding:0;color:inherit;font-size:inherit}\n.isad .cp{position:absolute;top:8px;right:8px;font-size:12px;padding:4px 10px;border:1px solid #334155;border-radius:5px;background:#1e293b;color:#e2e8f0;cursor:pointer}\n.isad .cp:hover{background:#334155}\n.isad .box{border-left:4px solid var(--acc);background:var(--acc-soft);padding:12px 16px;border-radius:0 6px 6px 0;margin:1.2em 0}\n.isad .box.warn{border-color:#d69e2e;background:var(--warn-soft)}\n.isad .box.ok{border-color:var(--ok);background:var(--ok-soft)}\n.isad .box p{margin:.3em 0}\n.isad table{width:100%;border-collapse:collapse;margin:1em 0 1.4em;font-size:.93em}\n.isad th,.isad td{border:1px solid var(--line);padding:8px 10px;text-align:left;vertical-align:top}\n.isad th{background:var(--soft)}\n.isad .tw{overflow-x:auto}\n.isad ol.steps{counter-reset:s;list-style:none;padding-left:0}\n.isad ol.steps>li{counter-increment:s;position:relative;padding-left:44px;margin:0 0 1.1em}\n.isad ol.steps>li:before{content:counter(s);position:absolute;left:0;top:0;width:30px;height:30px;border-radius:50%;background:var(--acc);color:#fff;font-weight:700;display:flex;align-items:center;justify-content:center;font-size:.9em}\n.isad .dl{display:inline-block;background:var(--acc);color:#fff!important;text-decoration:none!important;font-weight:600;padding:12px 22px;border-radius:8px;margin:.4em 0 1em}\n.isad .dl:hover{filter:brightness(1.1)}\n.isad .flow{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:1em 0 1.4em;font-size:.9em}\n.isad .flow span{background:var(--soft);border:1px solid var(--line);border-radius:6px;padding:6px 10px}\n.isad .flow span.x{text-decoration:line-through;color:var(--mut)}\n.isad .flow span.go{background:var(--ok-soft);border-color:var(--ok);font-weight:600}\n.isad .flow b{color:var(--mut)}\n.isad .eu{margin-top:2.5em;border:2px solid var(--ok);border-radius:10px;padding:6px 22px 14px;background:var(--ok-soft)}\n.isad .eu h2{border-bottom-color:#b7e2cc;margin-top:.8em}\n.isad .toc{background:var(--soft);border:1px solid var(--line);border-radius:8px;padding:10px 18px;margin:1.2em 0}\n.isad .toc ol{margin:.3em 0;padding-left:1.3em}\n.isad .toc a{color:var(--acc)}\n<\/style>\n\n<div class=\"isad\">\n\n<p class=\"lead\">Outlook 2016 \/ 2019 \/ 2021 \/ 2024 \/ Microsoft 365 connected to an <strong>on-premises Exchange <\/strong> keeps finding <code>autodiscover.outlook.com<\/code> instead of your own server. This guide shows how to point Outlook at the on-prem Autodiscover with a <strong>local Autodiscover XML file<\/strong>, using the domain <code>example.com<\/code> and the server <code>autodiscover.example.com<\/code> as an example. A ready-made script is at the end. It asks for the user&#8217;s email address and configures everything from that, including Outlook profiles that also have a Microsoft 365 mailbox.<\/p>\n\n<div class=\"toc\"><strong>Contents<\/strong>\n<ol>\n<li><a href=\"#isad-why\">Why Outlook goes to Office 365<\/a><\/li>\n<li><a href=\"#isad-pre\">Before you start<\/a><\/li>\n<li><a href=\"#isad-xml\">Step 1: Create the local XML file<\/a><\/li>\n<li><a href=\"#isad-reg\">Step 2: Registry settings<\/a><\/li>\n<li><a href=\"#isad-m365\">Outlook with an additional Microsoft 365 account<\/a><\/li>\n<li><a href=\"#isad-clean\">Step 3: Clear the cache and re-add the account<\/a><\/li>\n<li><a href=\"#isad-test\">Step 4: Verify<\/a><\/li>\n<li><a href=\"#isad-script\">Automated script (download)<\/a><\/li>\n<li><a href=\"#isad-gpo\">Mass deployment with GPO<\/a><\/li>\n<li><a href=\"#isad-trouble\">Troubleshooting and rollback<\/a><\/li>\n<li><a href=\"#isad-eu\">Summary for end users<\/a><\/li>\n<\/ol><\/div>\n\n<h2 id=\"isad-why\">Why Outlook goes to Office 365<\/h2>\n<p>Starting with Outlook 2016, Autodiscover <strong>first<\/strong> tries the Office 365 endpoint (<em>Direct Connect to Office 365<\/em>), and only then SCP and DNS. If the domain is verified in any Microsoft 365 \/ Entra tenant (even one used only for Teams or Intune), or an <code>autodiscover<\/code> DNS record is a CNAME to <code>autodiscover.outlook.com<\/code>, Outlook never reaches your Exchange server.<\/p>\n<div class=\"tw\"><table>\n<tbody><tr><th>Cause<\/th><th>How to check<\/th><\/tr>\n<tr><td>Domain is verified in an M365 tenant (Direct Connect)<\/td><td>Autoconfiguration log shows the Office 365 endpoint first<\/td><\/tr>\n<tr><td><code>autodiscover<\/code> CNAME to <code>autodiscover.outlook.com<\/code><\/td><td><code>nslookup autodiscover.example.com<\/code> (inside and outside)<\/td><\/tr>\n<tr><td>Cached &#8220;last known good&#8221; URL in the profile<\/td><td><code>%LOCALAPPDATA%\\Microsoft\\Outlook\\16\\*.xml<\/code><\/td><\/tr>\n<tr><td>Hybrid leftovers on the user object<\/td><td><code>msExchRemoteRecipientType<\/code> \/ <code>targetAddress<\/code><\/td><\/tr>\n<tr><td>Wrong SCP<\/td><td><code>Get-ClientAccessService | fl Name,AutoDiscoverServiceInternalUri<\/code><\/td><\/tr>\n<\/tbody><\/table><\/div>\n<p>With a local XML, the lookup order becomes:<\/p>\n<div class=\"flow\">\n<span class=\"x\">Office 365 endpoint<\/span><b>\u2192<\/b>\n<span class=\"go\">Local XML (redirect)<\/span><b>\u2192<\/b>\n<span>https:\/\/autodiscover.example.com<\/span><b>\u2192<\/b>\n<span>Exchange 2019 settings<\/span>\n<\/div>\n\n<h2 id=\"isad-pre\">Before you start<\/h2>\n<ul>\n<li><code>autodiscover.example.com<\/code> must resolve to the Exchange server (or load balancer) and be included in the Exchange certificate. If it is not, use <code>mail.example.com<\/code> in the URL.<\/li>\n<li>Open <code>https:\/\/autodiscover.example.com\/autodiscover\/autodiscover.xml<\/code> in a browser. A login prompt or <strong>HTTP 401<\/strong> is expected and means the service is alive.<\/li>\n<li>All settings are <strong>per user (HKCU)<\/strong>. Run them as the Outlook user, not as a different admin account.<\/li>\n<\/ul>\n\n<h2 id=\"isad-xml\">Step 1: Create the local XML file<\/h2>\n<p>The XML holds no fixed server settings. It is a <strong>redirect<\/strong>, so Outlook still gets MAPI\/HTTP and EWS settings from Exchange itself, and the file works for every user in the domain.<\/p>\n<p>Create the folder <code>%LOCALAPPDATA%\\Autodiscover<\/code> inside the user&#8217;s profile (<code>C:\\Users\\&lt;user&gt;\\AppData\\Local\\Autodiscover<\/code>). The user owns that folder, so no admin rights are needed. Save the XML there as <code>autodiscover-example.com.xml<\/code> (UTF-8). Name one file per domain, so a user with several on-prem domains gets one XML for each.<\/p>\n<div class=\"pre\"><button class=\"cp\" type=\"button\">Copy<\/button><pre><code>&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\n&lt;Autodiscover xmlns=\"http:\/\/schemas.microsoft.com\/exchange\/autodiscover\/responseschema\/2006\"&gt;\n  &lt;Response xmlns=\"http:\/\/schemas.microsoft.com\/exchange\/autodiscover\/outlook\/responseschema\/2006a\"&gt;\n    &lt;Account&gt;\n      &lt;AccountType&gt;email&lt;\/AccountType&gt;\n      &lt;Action&gt;redirectUrl&lt;\/Action&gt;\n      &lt;RedirectUrl&gt;https:\/\/autodiscover.example.com\/autodiscover\/autodiscover.xml&lt;\/RedirectUrl&gt;\n    &lt;\/Account&gt;\n  &lt;\/Response&gt;\n&lt;\/Autodiscover&gt;<\/code><\/pre><\/div>\n\n<h2 id=\"isad-reg\">Step 2: Registry settings<\/h2>\n<p>Key: <code>HKEY_CURRENT_USER\\Software\\Microsoft\\Office\\16.0\\Outlook\\AutoDiscover<\/code> (16.0 covers Outlook 2016, 2019, 2021 and Microsoft 365).<\/p>\n<div class=\"tw\"><table>\n<tbody><tr><th>Value name<\/th><th>Type<\/th><th>Data<\/th><th>Purpose<\/th><\/tr>\n<tr><td><code>PreferLocalXML<\/code><\/td><td>DWORD<\/td><td>1<\/td><td>Use the local XML file<\/td><\/tr>\n<tr><td><code>example.com<\/code><\/td><td>String (REG_SZ)<\/td><td><code>C:\\Users\\&lt;user&gt;\\AppData\\Local\\Autodiscover\\autodiscover-example.com.xml<\/code><\/td><td>Maps the SMTP domain to its XML file<\/td><\/tr>\n<tr><td><code>ExcludeLastKnownGoodURL<\/code><\/td><td>DWORD<\/td><td>1<\/td><td>Ignore the cached O365 URL<\/td><\/tr>\n<tr><td><code>ExcludeHttpsRootDomain<\/code><\/td><td>DWORD<\/td><td>1<\/td><td>Skip <code>https:\/\/example.com\/autodiscover<\/code> (the website)<\/td><\/tr>\n<tr><td><code>ExcludeExplicitO365Endpoint<\/code><\/td><td>DWORD<\/td><td><strong>1<\/strong> = on-prem mailboxes only<br><strong>0<\/strong> = Outlook also has a Microsoft 365 mailbox<\/td><td>Skip the Office 365 lookup. This setting applies to <em>every<\/em> account in Outlook. See the next section.<\/td><\/tr>\n<\/tbody><\/table><\/div>\n<p><code>ExcludeScpLookup<\/code> is not set. SCP stays on, which is the default and correct for domain-joined PCs.<\/p>\n<div class=\"box\"><p><strong>Note:<\/strong> <code>example.com<\/code> is a <strong>String Value<\/strong>, not a key. Its name must exactly match the part of the email address after the @. Add one value per SMTP domain if users have more than one.<\/p><\/div>\n<p>The same settings as a <code>.reg<\/code> file for on-prem only. Replace <code>USERNAME<\/code> with the user&#8217;s folder name. Backslashes are doubled in .reg syntax only.<\/p>\n<div class=\"pre\"><button class=\"cp\" type=\"button\">Copy<\/button><pre><code>Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\\Software\\Microsoft\\Office\\16.0\\Outlook\\AutoDiscover]\n\"PreferLocalXML\"=dword:00000001\n\"ExcludeLastKnownGoodURL\"=dword:00000001\n\"ExcludeHttpsRootDomain\"=dword:00000001\n\"ExcludeExplicitO365Endpoint\"=dword:00000001\n\"example.com\"=\"C:\\\\Users\\\\USERNAME\\\\AppData\\\\Local\\\\Autodiscover\\\\autodiscover-example.com.xml\"<\/code><\/pre><\/div>\n\n<h2 id=\"isad-m365\">Outlook with an additional Microsoft 365 account<\/h2>\n<p>Many users have their on-prem mailbox <strong>and<\/strong> a Microsoft 365 mailbox in the same Outlook. The Autodiscover registry values are global: they apply to every account in Outlook, not to a single domain. So:<\/p>\n<ul>\n<li><code>ExcludeExplicitO365Endpoint=1<\/code> turns off Direct Connect for the Microsoft 365 account too. That account then falls back to DNS lookups, which are slower, and it fails if the tenant domain&#8217;s <code>autodiscover<\/code> CNAME isn&#8217;t set up.<\/li>\n<li>It isn&#8217;t needed for the on-prem domain anyway. With <code>PreferLocalXML=1<\/code>, Outlook checks the local XML <strong>first<\/strong>, before the Office 365 endpoint, for any domain that has a mapping.<\/li>\n<\/ul>\n<div class=\"box ok\"><p><strong>Co-existence settings:<\/strong> <code>PreferLocalXML=1<\/code> plus the domain mapping, and <code>ExcludeExplicitO365Endpoint=0<\/code>. The on-prem domain uses the local XML, and the Microsoft 365 domain has no mapping, so it uses Direct Connect as usual.<\/p><\/div>\n<p>The script detects this case itself. It reads the accounts in all Outlook profiles and checks each domain against Microsoft&#8217;s login realm service (<code>getuserrealm.srf<\/code>). If any account is in a Microsoft 365 tenant, co-existence mode is offered as the default. It also logs whether the on-prem domain itself is registered in a tenant, which is the usual reason Outlook went to Office 365 in the first place.<\/p>\n\n<h2 id=\"isad-clean\">Step 3: Clear the cache and re-add the account<\/h2>\n<ol>\n<li>Close Outlook completely (check Task Manager).<\/li>\n<li>In <code>%LOCALAPPDATA%\\Microsoft\\Outlook\\16\\<\/code>, delete the cached Autodiscover <code>*.xml<\/code> files that contain <code>@example.com<\/code>. If there&#8217;s no Microsoft 365 account in Outlook, you can delete them all.<\/li>\n<li>If the on-prem account was already created against Office 365, remove <strong>only that account<\/strong> (File \u2192 Account Settings \u2192 Remove) and add it again. Other accounts, including Microsoft 365, can stay. If Outlook has only that one account, creating a new profile is cleaner: <strong>Control Panel \u2192 Mail \u2192 Show Profiles \u2192 Add<\/strong>.<\/li>\n<\/ol>\n\n<h2 id=\"isad-test\">Step 4: Verify<\/h2>\n<ol>\n<li>Open Outlook, hold <strong>Ctrl<\/strong>, right-click the Outlook icon in the system tray, and choose <strong>Test E-mail AutoConfiguration<\/strong>.<\/li>\n<li>Enter the email address and password, <strong>uncheck<\/strong> both Guessmart options, and click <strong>Test<\/strong>.<\/li>\n<li>On the <strong>Log<\/strong> tab you should see the local XML being used and a redirect to <code>autodiscover.example.com<\/code>. On the <strong>Results<\/strong> tab, the server URLs should be your Exchange, not <code>outlook.office365.com<\/code>.<\/li>\n<\/ol>\n<div class=\"box ok\"><p>On the <strong>Connection Status<\/strong> window (Ctrl + right-click the tray icon), the server column should show your on-prem server and the protocol <strong>HTTP<\/strong> (MAPI over HTTP).<\/p><\/div>\n\n<h2 id=\"isad-script\">Automated script (download)<\/h2>\n<p>The ZIP contains a PowerShell script and a launcher that do steps 1\u20133 for the logged-on user, for any domain:<\/p>\n<ol>\n<li><strong>Asks for the email address.<\/strong> On a domain-joined PC it suggests the address from Active Directory, so the user can just press Enter.<\/li>\n<li><strong>Finds the server.<\/strong> It takes the domain from the address and tests <code>https:\/\/autodiscover.&lt;domain&gt;<\/code> and <code>https:\/\/mail.&lt;domain&gt;<\/code>. A 401 response counts as success. The user picks one, or types another host name.<\/li>\n<li><strong>Checks for Microsoft 365.<\/strong> It looks for Microsoft 365 accounts in the Outlook profiles and chooses <em>on-prem only<\/em> or <em>co-existence<\/em> mode.<\/li>\n<li><strong>Writes the XML.<\/strong> It creates <code>%LOCALAPPDATA%\\Autodiscover\\<\/code> in the user&#8217;s profile and writes <code>autodiscover-&lt;domain&gt;.xml<\/code> there.<\/li>\n<li><strong>Writes the registry values<\/strong> for that domain and mode.<\/li>\n<li><strong>Clears the cache.<\/strong> It closes Outlook (after asking) and deletes only the cached Autodiscover files for that domain.<\/li>\n<li><strong>Logs<\/strong> everything to <code>%TEMP%\\Set-LocalAutodiscover.log<\/code>.<\/li>\n<\/ol>\n<p>Run it again with another address to add more on-prem domains. <code>\/remove<\/code> rolls back.<\/p>\n<p><a class=\"dl\" href=\"https:\/\/itsimple.info\/wp-content\/uploads\/2026\/10\/Outlook-Local-Autodiscover.zip\" download=\"\">\u2b07 Download Outlook-Local-Autodiscover.zip<\/a><\/p>\n<p><strong>Usage<\/strong> (extract all files to one folder first):<\/p>\n<div class=\"pre\"><button class=\"cp\" type=\"button\">Copy<\/button><pre><code>:: Simple - double-click, as the logged-on user (NOT \"Run as administrator\")\nSetup-Autodiscover.cmd\n\n:: Undo everything the script configured\nSetup-Autodiscover.cmd \/remove\n\n# PowerShell - no prompts, server and mode chosen automatically\npowershell -ExecutionPolicy Bypass -File .\\Set-LocalAutodiscover.ps1 -Email user@example.com -Force\n\n# Fixed server, Outlook also has a Microsoft 365 mailbox\npowershell -ExecutionPolicy Bypass -File .\\Set-LocalAutodiscover.ps1 `\n  -Email user@contoso.com -AutodiscoverHost mail.contoso.com -Mode CoexistM365\n\n# Remove one domain only\npowershell -ExecutionPolicy Bypass -File .\\Set-LocalAutodiscover.ps1 -Remove -Email user@contoso.com<\/code><\/pre><\/div>\n<div class=\"tw\"><table>\n<tbody><tr><th>Parameter<\/th><th>Meaning<\/th><\/tr>\n<tr><td><code>-Email<\/code><\/td><td>Mailbox address. If omitted, the script asks (and suggests the address from AD).<\/td><\/tr>\n<tr><td><code>-AutodiscoverHost<\/code><\/td><td>Server host name. If omitted, <code>autodiscover.<\/code> and <code>mail.<\/code> + domain are tested.<\/td><\/tr>\n<tr><td><code>-Mode<\/code><\/td><td><code>Auto<\/code> (default), <code>OnPremOnly<\/code> or <code>CoexistM365<\/code><\/td><\/tr>\n<tr><td><code>-Force<\/code><\/td><td>No prompts, for GPO. Uses <code>-Email<\/code>, or the AD <code>mail<\/code> attribute.<\/td><\/tr>\n<tr><td><code>-Remove<\/code><\/td><td>Roll back all domains, or only the one given with <code>-Email<\/code><\/td><\/tr>\n<\/tbody><\/table><\/div>\n\n<h2 id=\"isad-gpo\">Mass deployment with GPO<\/h2>\n<ul>\n<li><strong>Script:<\/strong> run <code>Set-LocalAutodiscover.ps1 -Force<\/code> as a <em>User Logon<\/em> script (User Configuration \u2192 Windows Settings \u2192 Scripts \u2192 Logon). It reads each user&#8217;s address from the AD <code>mail<\/code> attribute, so one GPO covers everyone. Add <code>-Mode CoexistM365<\/code> if users also have Microsoft 365 mailboxes.<\/li>\n<li><strong>Or with Group Policy Preferences:<\/strong>\n  <ul>\n  <li>Use <em>Files<\/em> to copy the XML to <code>%LOCALAPPDATA%\\Autodiscover\\autodiscover.xml<\/code>.<\/li>\n  <li>Use <em>Registry<\/em> (User Configuration) to create the values from Step 2.<\/li>\n  <\/ul><\/li>\n<li>For the policy path, use <code>HKCU\\Software\\Policies\\Microsoft\\Office\\16.0\\Outlook\\AutoDiscover<\/code>. Users can&#8217;t change it, and it takes precedence over the preference path.<\/li>\n<\/ul>\n<div class=\"box warn\"><p><strong>Long-term fix:<\/strong> the local XML is a client-side workaround. Also fix the cause:<\/p>\n<ul>\n<li>Remove any <code>autodiscover<\/code> CNAME that points to <code>outlook.com<\/code>.<\/li>\n<li>Set the SCP: <code>Set-ClientAccessService -Identity EX01 -AutoDiscoverServiceInternalUri https:\/\/autodiscover.example.com\/autodiscover\/autodiscover.xml<\/code><\/li>\n<li>If the domain must stay verified in M365, keep <code>ExcludeExplicitO365Endpoint=1<\/code> in GPO permanently.<\/li>\n<\/ul><\/div>\n\n<h2 id=\"isad-trouble\">Troubleshooting and rollback<\/h2>\n<div class=\"tw\"><table>\n<tbody><tr><th>Symptom<\/th><th>Fix<\/th><\/tr>\n<tr><td>Still connects to Office 365<\/td><td>Old profile. Create a new one, and check the domain value name matches the address exactly.<\/td><\/tr>\n<tr><td>Certificate warning<\/td><td>The URL host name is not on the Exchange certificate. Use the name that is (for example <code>mail.example.com<\/code>).<\/td><\/tr>\n<tr><td>Endless password prompts<\/td><td>Check Autodiscover\/MAPI virtual directory authentication (NTLM\/Negotiate) and the URLs in <code>Get-MapiVirtualDirectory<\/code>.<\/td><\/tr>\n<tr><td>XML ignored<\/td><td>The settings were written to the wrong user&#8217;s HKCU (the script was run elevated as an admin). Run it as the user.<\/td><\/tr>\n<tr><td>Script blocked<\/td><td>Use the <code>.cmd<\/code> launcher (it uses <code>-ExecutionPolicy Bypass<\/code>), or right-click the files \u2192 Properties \u2192 <em>Unblock<\/em>.<\/td><\/tr>\n<\/tbody><\/table><\/div>\n<p>Rollback: run <code>Setup-Autodiscover.cmd \/remove<\/code>, or delete the values above from the registry and delete the XML file.<\/p>\n\n<!-- ===================== END USER SUMMARY ===================== -->\n<div class=\"eu\" id=\"isad-eu\">\n<h2>In short, for end users<\/h2>\n<p>If Outlook can&#8217;t find your company mailbox or keeps asking you to sign in to Microsoft 365, this fix tells Outlook where your company mail server is.<\/p>\n<ol class=\"steps\">\n<li><strong>Download<\/strong> the file <a href=\"https:\/\/itsimple.info\/wp-content\/uploads\/2026\/10\/Outlook-Local-Autodiscover.zip\" download=\"\">Outlook-Local-Autodiscover.zip<\/a>.<\/li>\n<li><strong>Extract<\/strong> the ZIP: right-click it, choose <em>Extract All<\/em>, then click <em>Extract<\/em>.<\/li>\n<li><strong>Double-click<\/strong> <code>Setup-Autodiscover.cmd<\/code>. If Windows shows &#8220;Windows protected your PC&#8221;, click <em>More info \u2192 Run anyway<\/em>.<\/li>\n<li><strong>Type your work email address<\/strong> and press Enter. If your address is already shown in brackets, just press Enter.<\/li>\n<li>For the other questions, <strong>press Enter<\/strong> to accept the suggested answer. If you also use a Microsoft 365 mailbox in Outlook, answer <strong>Y<\/strong> when asked.<\/li>\n<li>If you&#8217;re asked to close Outlook, press Enter. Wait for the green &#8220;Done&#8221; message, then press any key.<\/li>\n<li><strong>Open Outlook.<\/strong> If it still doesn&#8217;t connect, contact IT support. They may need to remove your work account and add it again.<\/li>\n<\/ol>\n<p>Your email, contacts and calendar are not deleted, and other mail accounts in Outlook keep working. Only the way Outlook finds your work mail server changes.<\/p>\n<\/div>\n\n<\/div>\n\n<script>\ndocument.querySelectorAll('.isad .cp').forEach(function(b){\n  b.addEventListener('click',function(){\n    var t=b.parentNode.querySelector('code').innerText;\n    var done=function(){b.textContent='Copied';setTimeout(function(){b.textContent='Copy'},1500)};\n    if(navigator.clipboard){navigator.clipboard.writeText(t).then(done)}else{\n      var a=document.createElement('textarea');a.value=t;document.body.appendChild(a);a.select();document.execCommand('copy');a.remove();done();}\n  });\n});\n<\/script>\n\n\n\n<figure class=\"wp-block-pullquote has-vivid-green-cyan-color has-text-color has-link-color has-large-font-size wp-elements-1\"><blockquote><p><strong>Good Luck<\/strong><\/p><\/blockquote><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Outlook 2016 \/ 2019 \/ 2021 \/ 2024 \/ Microsoft 365 connected to an on-premises Exchange keeps finding autodiscover.outlook.com instead of your own server. This guide shows how to point Outlook at the on-prem Autodiscover with a local Autodiscover XML file, using the domain example.com and the server autodiscover.example.com as an example. A ready-made script [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,9,23,21,4,12,14],"tags":[],"class_list":["post-3240","post","type-post","status-publish","format-standard","hentry","category-microsoft-exchange-2013","category-microsoft-exchange-2016","category-office-365","category-operating-systems","category-tech","category-tutorials","category-windows"],"_links":{"self":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/3240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3240"}],"version-history":[{"count":9,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/3240\/revisions"}],"predecessor-version":[{"id":3252,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/3240\/revisions\/3252"}],"wp:attachment":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}