Category Archives: Azure

FAILED_TO_AUTO_DISCOVER_DOMAIN – Teams Admin Console

I recently started working on an O365 pilot/implementation and had issues getting into the Teams Admin Console. Even after making sure a license was applied to my admin account I was still receiving this error:

Sorry, we can't sign you in.

The domain you are trying to sign in to doesn't have any users that have a Microsoft Teams or Skype for Business Online license assigned to them. Learn more

...

Error Code: FAILED_TO_AUTO_DISCOVER_DOMAIN
Tenant ID: xxxx
Correlation ID: xxxx
Timestamp: 2019-06-18T13:14:35.0463597Z

This wound up being an AutoDiscover issue with the domain my account was using. This can be verified by going to https://webdir.online.lync.com/Autodiscover/AutodiscoverService.svc/root?Domain=yourdomain.com. When AutoDiscover was not working the output was:

<reason xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/rtc/2012/03/ucwa" reasonid="0">
<code>NotFound</code>
<subcode>None</subcode>
<debugInfo/>
<parameters/>
</reason>

I had to enable, disable, AND re-enable the domain using the LyncOnlineConnector PowerShell cmdlets:

  • Import-Module LyncOnlineConnector
  • $Session = New-CsOnlineSession –UserName ‘AdminAccountUPN‘ –OverrideAdminDomain ‘AzureADDomainFQDN’ (Azure domain will be *.onmicrosoft.com)
  • Enable-CsOnlineSipDomain –Domain ‘DomainOfAdminAccountUPN
  • Disable-CsOnlineSipDomain –Domain ‘DomainOfAdminAccountUPN
  • Enable-CsOnlineSipDomain –Domain ‘DomainOfAdminAccountUPN

After doing the above I was able to go to https://webdir.online.lync.com/Autodiscover/AutodiscoverService.svc/root?Domain=yourdomain.com and get a proper output:

<resource xmlns="http://schemas.microsoft.com/rtc/2012/03/ucwa" rel="root" href="https://webdir1b.online.lync.com/Autodiscover/AutodiscoverService.svc/root?originalDomain=domain.com">
<link rel="xframe" href="https://webdir4a.online.lync.com/Autodiscover/AutodiscoverService.svc/root/xframe"/>
<link rel="redirect" href="https://webdir4a.online.lync.com/Autodiscover/AutodiscoverService.svc/root?originalDomain=domain.com"/></resource>

Azure AD Connect mail-enabled public folder synchronization issues – The cause of the error is not clear

We recently went through some Exchange Online Protection (EOP) cleanup and part of that involved turning on Directory Based Edge Blocking. We already went through the exercise of syncing all objects (especially ones part of Exchange), but the only ones that weren’t being synced were mail-enabled public folders. After turning on Directory Based Edge Blocking we realized there were a few public folders that needed to receive mail from the Internet. After syncing mail-enabled public folders (this is a newer feature in AD Connect) we received synchronization errors for four objects. The only thing these objects had in common was that they referenced a mail-enabled public folder by either having that object as a group member or having it as a forwarding object on a mailbox.

The errors we receiving were:

  • The cause of the error is not clear. This operation will be retried during the next synchronization. If the issue persists, contact Technical Support.
  • IdentityDataValidationFailed

The workaround is to create a mail contact object that has the same targetAddress as the mail-enabled public folder object and use that object in place of the public folder object in something like a group membership. The issue with this is that by design a mail contact’s targetAddress is also part of its proxyAddresses attribute and the mail-enabled public folder object of course already has the email address as part of its proxyAddresses attribute. This duplicate is not allowed. The way around this is to modify the mail contact object so that the targetAddress is not part of proxyAddresses. To create this special mail contact you do the following:

  • Create a mail contact in Exchange with a fake external address
  • Disable e-mail address policy for the object
  • Use ADSIEdit to:
    • Change the targetAddress to the email address of the mail-enabled public folder
    • Remove the fake external address you specified earlier from proxyAddresses

After the object has been created you can now use it in lieu of the mail-enabled public folder in group memberships and other attributes.