none
Outlook 2016 connects to Office 365 mailboxes of mydomain.co.uk only when outside the local domain network

    Question

  • Outlook 2016 connects to Office 365 mailboxes of mydomain.co.uk  only when outside the local domain network.

    When configuring Outlook 2016 from a home PC, it connects to the Office 365 mailbox fine.  When using Outlook 2016 in the office LAN either on a domain-joined or a PC that is not domain-joined, it will not allow me to setup the mailbox, it does not connect to Office 365.  No outbound ports are blocked on the router.  From within the office LAN we have to use OWA because we can’t get Outlook 2016 connected.

    The PCs in the office are Domain joined.  We used to use Exchange 2010 in-house, but all Exchange Services have now been stopped and disabled.  O365 is setup complete with an autodiscover record in the public DNS.  The private DNS server does not have a zone for the public domain which is yorksurvey.co.uk.

    I launched the Mail applet in Control panel to add a mailbox, but it tries to connect to the local (now defunct) in-house exchange server.  The three green ticks in the new mailbox wizard appear very quickly indeed (which is unusual for Office 365) then Outlook gives an error saying it cannot open the mailbox folders, and that is because it is talking to the local Exchange server but that is now shut down.

    So, I resolved that issue by adding to the registry the DWORD ExcludeScpLookup and set this to 1 in the key: HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\AutoDiscover

    I have had to add the ExcludeScpLookup DWORD on other clients who also move from in-house Exchange 2010 to Office 365 and that normally solves the problem.

    However when I now try to add a profile to the Mail applet it says the following:

    “We’re sorry, we couldn’t set up your account automatically.  To try setting up the account yourself, click Next.”

    If I click Next, the option to setup via O365 is presented and the same thing happens.

    If I run nslookup and test autodiscover.yorksurvey.co.uk it resolves perfectly.

    If, on an unrelated computer outside the office LAN that runs Outlook using a different setup (just to get Outlook to run), I test the autodiscover configuration by Ctrl+Clicking the Outlook icon and putting in the yorksurvey.co.uk details, it reports that everything is fine.

    Therefore it seems there must be a local setting on the server that adversely affects the PCs from getting Outlook 2016 to work. 

    I referred to this article: https://support.microsoft.com/en-gb/help/2212902/unexpected-autodiscover-behavior-when-you-have-registry-settings-under and I tried a variety of values (either 0 or 1) for the various registry keys specified in that article but I could not get it to work.

    How do I go about troubleshooting this issue towards a fix?

    Thank you.

    Wednesday, November 08, 2017 4:02 PM

All replies

  • Hi Paul,

    Thanks for visiting our forum.

    Then here we mainly focus on general issues about Office client. Since your query is related to connecting to Office 365 (Exchange online), I'll move your thread to the following dedicated forum for Exchange Online:

    https://social.technet.microsoft.com/Forums/office/en-US/home?forum=onlineservicesexchange

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    Best regards,
    Yuki Sun


    Please remember to mark the replies as answers if they helped.

    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Thursday, November 09, 2017 10:08 AM
  • Hi,

    From your description, I know that the Outlook client try to connect to local Exchange 2010 server (which is now shut down) and connection fails for Office 365 mailbox.
    If I mislead your concern, please be free to let me know.

    I notice that the connection works fine after set ExcludeScpLookup on Outlook client. I suppose that the Outlook client remain query the Active Directory to get SCP and use it to connect to Exchange server.

    Would you please help to collect the test result of "Test E-mail AutoConfiguration" with Office 365 account?
    Note: please send the screenshot to GBSD TN BizApps Information Collection (ibsexc@microsoft.com).

    For Exchange Online mailbox, the Test E-mail AutoConfiguration test process will test SCP, https://domain.com/autodiscover...., https://autodiscover.domain.com/autodiscover...., HTTP redirect. However it will fails. At last, it will redirect to autodiscover-s.outlook.com and succeed.

    Moreover, is there any network proxy setting on internal network?
    If so, please remove it and try again.

    Regards,
    Allen Wang


    Please remember to mark the replies as answers if they helped.
    If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Friday, November 10, 2017 10:30 AM
    Moderator
  • This happens when exchange is not properly removed from the organization and just uninstalled. Proper steps have to be taken. I assume your exchange server name is still present in the dns records and even can be seen in adsiedit.

    from externally, o365 outlook will connect as it depends on public dns but here your own dns comes to picture and your outlook looks for scp record locally. you have to delete the old scp records

    autodiscover.domain.com should resolve to o365 and not to your own old exchange server. You have to delete old scp entries.


    Thanks & Regards Ramandeep Singh

    Saturday, November 11, 2017 8:06 AM