Quantcast
Channel: Exchange Server 2013 - Mobility and ActiveSync forum
Viewing all articles
Browse latest Browse all 1206

Autodiscover not working when when AD domain name is different from the email domain (how I fixed it).

$
0
0

I ran into an issue where autodiscover would fail externally and I would have to manually enter the server name and the AD domain name on the device. This happened with androids, outlook on win 8, and iphones/ipads. Internally it worked fine. All tested passed on https://www.testexchangeconnectivity.com, but I still ran into the issue.

This is how I fixed it,

My environment was setup as follows:

AD Server 2012

Exchange 2013 on Server 2012

AD domain = contoso.net

Email domain = contoso.org

contoso.org is our organizations website and it is hosted elsewhere, but I have control of the DNS.

Internal dns records. all point the LAN IP address of the server

A - mail.contoso.org

A- autodiscover.contoso.org

A- owa.contoso.org

A - servername.contoso.org

All of the above point the LAN IP address of the server

External dns records

A - mail.contoso.org

CNAME- autodiscover.contoso.org ---> mail.contoso.org

A- owa.contoso.org

A - servername.contoso.org

All of the above point the public address of the server

First I added an alternative UPN suffix (contoso.org)

http://technet.microsoft.com/en-us/library/cc772007.aspx

Next I changed a test user to the new suffix 

AD users and computers >username > properties > account > select the suffix from the drop down.

Tested it and everything worked. I was able to simply login to any device I tested withusername@contoso.org and the password.

To future proof this I made a quick and dirty powershell script out of a command I found on the link above and set it to run as a scheduled task nightly on one of my domain controllers 

Get-ADUser -Filter * -properties homemdb | where {$_.homemdb -ne $null} | ForEach-Object ($_.SamAccountName) {$CompleteUPN = $_.SamAccountName + “@contoso.org”; Set-ADUser -Identity $_.DistinguishedName -UserPrincipalName $CompleteUPN}

"The above script:

·        Gets all users with something in their homemdb attribute (i.e. mailbox users)

·
        Creates a temporary variable called $completeUPN which is a
combination of every user’s samaccountname plus @contoso.com

·        Sets each user to this new upn"

I hope this helps someone, because I was banging my head against the wall for while trying to figure this out.



Viewing all articles
Browse latest Browse all 1206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>