How to setup Outlook 2013 to connect to an Exchange 2013 account in a different domain
Having gone through the pain twice now (you’d think I’d learn the first time) I’m going to punch out a quick blog post for future.
My development machine is in our corporate domain (corpdomain.com) and I’m doing development against Exchange 2013. I’ve setup an isolated domain with it’s own Active Directory server and Exchange server (let’s call it devdomain.com). I need to be able to connect my Outlook 2013 client on my development machine (in corpdomain.com) to the Exchange 2013 server in a different environment (devdomain.com). Since I’m just doing some isolated dev I don’t want to be creating entries in our corporate DNS or AD.
In my case I’ve already established TCP connectivity between corpdomain.com and devdomain.com (i.e. I can ping between them).
Try as I might I just cannot manually setup a connection to the Exchange 2013 server. Outlook just keeps telling me it cannot establish connectivity to the Exchange server or the user account cannot be found (this is through both starting Outlook without a profile or Control Panel>Mail to create a new profile).
The Answer (for me anyway)
The only way I can get it to work is to go through the Exchange autodiscover process, and to make this happen I add an entry for autodiscover.devdomain.com into the hosts file on the development machine and point it to the IP address of the Exchange 2013 server.
Here’s the steps to perform on the Outlook client machine:
Now delete all profiles (through Control Panel>Mail>Profiles) then start Outlook.
Edit your hosts file (you need to have Admin rights to save changes) and add an entry for the autodiscover to work
Now start Outlook and you should get the account setup wizard
Give your profile a name
Enter the Email address as email@example.com and password
All going well I get a prompt regarding a security certificate
Click view Certificate… and Install Certificate (then just keep accepting defaults)
Finally you get back to the original dialog above and click Yes
All going well you now get a successful connection and can start Outlook connected to your Exchange 2013 server in another domain.
All is now good to go. I can debug my Outlook 2013 addin connected to an Exchange 2013 server in a different domain.
I’ll stress that this solution is a quick and dirty approach suitable only in a temporary development scenario. I would not suggest this for any type of production environment.