Using Office 365 in an SBS 2008 Environment, Take 2

Mark Berry August 26, 2011

After working with a very helpful Microsoft Support manager, here are some updated suggestions to the problems identified in the first version of this article.

Getting Mail to Leave SBS

The support manager reminded me that Office 365 offers an email alias in the mydomain.onmicrosoft.com domain. If my primary email is myuser@mydomain.com, Office 365 lets me use myuser@mydomain.onmicrosoft.com as well. I had removed that alias but was able to re-add it through the Online Exchange mailbox configuration screen, under E-Mail Options.

So the solution is still to send the email to an account outside your domain, but you can use your custom subdomain on Office 365:

O365 and SBS Update 1

Getting Outlook to Autodiscover Office 365

While editing the Service Connection Point in Active Directory Sites and Services does work, it’s probably not the “approved” way to do things.

The support manager recommended that I instead use the Exchange Management Shell to entirely remove the Autodiscover Virtual Directory using Remove-AutodiscoverVirtualDirectory. Here’s how I did that:

1. Open an elevated command prompt and back up the IIS configuration (explained here):

%windir%\system32\inetsrv\appcmd.exe add backup "Before Removing Autodiscover"

2. Open an elevated Exchange Management Shell and retrieve the current autodiscover virtual directory:

>Get-AutodiscoverVirtualDirectory | fl Name, Server, InternalUrl, Identity

Copy the Identity value to the clipboard.

3. In the Exchange Management Shell, remove the autodiscover virtual directory:

Remove-AutodiscoverVirtualDirectory –Identity <identity value retrieved above>

You will have to confirm by typing a “Y”.

4. Check that the autodiscover virtual directory is gone:

Get-AutodiscoverVirtualDirectory | fl Name, Server, InternalUrl, Identity

This should now return nothing.

5. Now, with Outlook running on a desktop, hold the Ctrl button, right-click on the Outlook icon in the system tray, and select Test E-mail AutoConfiguration. Enter your email address and password and click the Test button. The results should come from the Office 365 server.



21 Comments

  1. Using Office 365 in an SBS 2008 Environment | MCB Systems   |  August 26, 2011 at 10:54 am

    [...] August 26, 2011 There is now an updated version of this [...]

  2. Tim Carney   |  July 22, 2012 at 1:35 pm

    At least on my server, I needed to add quotes around the to get the command to work, so for your step #3 I used:

    Remove-AutodiscoverVirtualDirectory -Identity “”

    so, if your SBS server was named SBS the command would likely be:

    Remove-AutodiscoverVirtualDirectory -Identity “SBS\Autodiscover (SBS Web Applications)”

  3. Mark Berry   |  July 22, 2012 at 2:34 pm

    Thanks Tim!

  4. David Ringwald   |  October 08, 2012 at 6:53 am

    You are awesome!
    Thank you so much for publishing this post. Microsoft has not been much help with this problem.

  5. Stewart Newfeld   |  November 16, 2012 at 6:29 am

    This post was very helpful and I used the technique to move try Office 365 for my client’s 6-users SBS2008 network. But they found office 365 too slow and decided they didn’t want it. Are there commands or a procedure to restore the AutodiscoverVirtualDirectory? Help would be greatly appreciated.

  6. Mark Berry   |  November 16, 2012 at 6:48 am

    Stewart, there is a New-AutodiscoverVirtualDirectory command but I’ve never used it.

    I can’t remember for sure why I included an IIS backup as the first step, but I have to think that it was to provide a way to reverse the procedure. The link in step 1 includes instructions on restore. It even says there are automatic backups before a change it made. Again, I haven’t had to do that.

  7. Stephan   |  December 31, 2012 at 8:39 am

    You sir are a genius! Microsofts best suggestion was to add a local autodiscover DNS entry which really doesnt help (although this is probably required for the final solution if the server is resolving the autodiscover locally as ours was) and their seccond suggestion was to add registry changes to every machine on the domain to disable local autodiscover – far from ideal!

    I did the above changes on an SBS 2011 so it would appear its fine for an Exchange 2010 environment. Worked instantly & the Outlook autodiscover test came straight back with the correct Office 365 details.

    Thanks again

    Stephan

  8. Bruce Berls   |  January 28, 2013 at 10:33 am

    Aargh! I just went through a migration and wrestled with this problem – and wound up with a registry entry on every machine to disable local autodiscover. (Which is a per-user setting, and requires a restart to be effective.) I wish I had known this 90 days ago! Thanks for the tip.

  9. Danny   |  April 13, 2013 at 9:24 am

    Thanks you saved my weekend !!!

  10. Enable Office 365 Auto-discover for Outlook in SBS 2011 Exchange Environments | Kirb.IT   |  April 29, 2013 at 2:20 pm

    [...] Tip to mcbsys.com for pointing me in the right [...]

  11. Bora   |  May 27, 2013 at 3:20 pm

    I followed the instructions and got autodiscover to show up correctly, but Outlook continues to keep prompting for the password for o365. The password works when I test externally? Outlook is installed on RDS or Terminal server.

  12. Mark Berry   |  May 27, 2013 at 10:58 pm

    Bora, of course it’s hard to say without fully understanding your environment, but offhand that doesn’t sound like an autodiscover issue. I blogged about one possible cause for repeated logon prompts back when I was using local Exchange:

    http://www.mcbsys.com/techblog/2011/03/outlook-2010-repeated-logon-prompts/

    Maybe something similar applies for O365.

  13. Bora   |  May 28, 2013 at 12:49 am

    Mark, thanks for the reply. What I noticed is autodiscover on o365 seems to correct (nslookup is pointing correct to autodiscover.outlook.com), but it is still authenticating using local Exchange SBS 2008.

    I removed virtual directory, added cname internally to point to autodiscover.outlook.com and changed reply to email address to something different than o365, but all failed.

  14. Bora   |  May 28, 2013 at 8:32 am

    Mark, I noticed that it’s attempting to authenticate with the internal Exchange 2007 instead of going to o365 server. Even if I changed the DNS to use external, it keeps attempting to connect to local Exchange? Any ideas?

  15. Mark Berry   |  May 28, 2013 at 9:20 am

    Bora, the log tab of the Test E-mail Autoconfiguration tool described in the post might help you to follow what’s going on. For personalized support, you may need to contact O365 support and/or post in their forums. Also I don’t see the domain verification code in the public DNS records for employees.org–don’t know if that needs to stay there after verification, but I left mine in:

    http://onlinehelp.microsoft.com/en-us/office365-enterprises/gg584188.aspx

    You’ll also want to update your SPF record once you get things working.

  16. Mark Berry   |  May 28, 2013 at 9:32 am

    Bora, also just noticed that autodiscover.employees.org doesn’t resolve, at least not in the public DNS. You need to set up a CNAME for that. http://help.outlook.com/en-us/140/cc950655.aspx.

    I seem to remember some step-by-step process for all the domain changes needed to get O365 working…

  17. Steve b   |  May 28, 2013 at 7:33 pm

    Thanks for this post. The PS script to remove the auto discover virtual directory worked perfect. Outlook now resolves the correct information from o365.

  18. Bora   |  May 28, 2013 at 9:11 pm

    Quick update… There is setup for the desktop from o365 to download and install. They call it a hotfix for Outlook 2010. Now it resolve and correctly authentication with o365.

  19. Mark Berry   |  May 28, 2013 at 9:44 pm

    Bora, thank you for the update. Glad you got it working. What is the KB number for the hotfix? Do you have Service Pack 1 for Office 2010 installed? It would be good to know if the hotfix is necessary if the program is fully patched by automatic updates.

  20. Chad   |  November 06, 2013 at 5:43 pm

    Thanks so much. Been fighting this for a few days and this seems to have resolved the issue

  21. Jason   |  February 05, 2014 at 10:40 am

    This works! Shame on Microsoft for not better documenting how to disable Autodiscover on their Exchange servers. This issue has haunted my team for a year. We played all kinds of stupid games with DNS that only marginally worked and wasted huge amounts of time. We’re Microsoft partners ourselves and Partner support told us this was not possible.

    As a side note there was residual damage to the Out of Office feature in Outlook caused by this. Even after this fix we still got the error “Your Out of Office settings cannot be displayed, because the server is currently unavailable. Try again later”. To correct this visit this URL from the client machine: https://outlook.office365.com/EWS/Exchange.asmx (it’s the OOF URL). Then enter the users Office 365 credentials. You are directed to a page telling you how to further test the “service you enabled”. Ignore the provided instructions and simply close the browser and try OOF from Outlook again.

Leave a Reply





Notify me of followup comments via e-mail. You can also subscribe without commenting.