MSExchange Autodiscover Event ID 1 after adding second server

asked 2022-06-20T12:51:33.587+00:00
Corey 46 Reputation points

We had a single Exchange 2019 CU11. We recently added a second server to host the Hybrid Configuration Wizard, as suggested by a few Exchange experts. After adding the server, we suddenly started receiving the following Event in the Application Log. We've double checked all the URL's/URI's and everything is set correctly. I stumbled upon this article ( which indicates this is a bug and to simply set the ExternalUrl for AutoDiscover. However "ExternalUrl" isn't a valid parameter for Set-AutodiscoverVirtualDirectory. I also found this post which doesn't seem to have any indication of a solution,

In addition to this, I also experienced a "Password Needed" loop in Outlook where eventually I received the error below. This error eventually disappeared and Outlook was working again. I'm hoping this was an isolated incident and not related to the issue above but thought I'd mention it since it was also mentioned in

Error code "CAA2000B"
Server message "AADSTS500011: The resource principal named https://NEW_EXCAHNGE_SERVER_FQDN/ was not found in the tenant names COMPANY NAME. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant..."

I will open a case with Microsoft as I suspect the Autodisover error is just a bug. Just curious if anyone else has any suggestions. Thanks.

  • <Event xmlns="">
  • <System>
    <Provider Name="MSExchange Autodiscover" />
    <EventID Qualifiers="49152">1</EventID>
    <TimeCreated SystemTime="2022-06-20T11:47:31.026898400Z" />
    <Security />
  • <EventData>
    <Data>Object reference not set to an instance of an object.</Data>
    <Data>at Microsoft.Exchange.AutoDiscoverV2.FlightSettingRepository.GetHostNameFromVdir(ADObjectId serverSiteId, String protocol) at Microsoft.Exchange.AutoDiscoverV2.AutoDiscoverV2.ExecuteOnPremEndFlow(AutoDiscoverV2Request request) at Microsoft.Exchange.AutoDiscoverV2.AutoDiscoverV2.Execute(AutoDiscoverV2Request request, ITenantRepository tenantRepository) at Microsoft.Exchange.AutoDiscoverV2.AutoDiscoverV2HandlerBase.<>c__DisplayClass11_0.<ProcessRequest>b__0() at Microsoft.Exchange.Common.IL.ILUtil.DoTryFilterCatch(Action tryDelegate, Func2 filterDelegate, Action1 catchDelegate)</Data>
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
6,064 questions
No comments
{count} votes

Accepted answer
  1. answered 2022-06-20T17:04:46.153+00:00
    Andy David - MVP 108.6K Reputation points Microsoft MVP

    Make you set that using the snap-in for Exchange Powershell, not remote powershell.

    Per that article:

    Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010  

    then run:

    Get-AutodiscoverVirtualDirectory -Server YourExchangeServerName |set-AutodiscoverVirtualDirectory -ExternalUrl https://autodiscover.FQDN/Autodiscover/Autodiscover.xml  

0 additional answers

Sort by: Most helpful