Autodiscover issue internal server error occured Exchange 2019

Jean-Marc Francois 41 Reputation points
2021-10-28T10:29:55.397+00:00

We are migrating the current exchange 2013 to Exchange 2019. (OrgA)
This organization is sharing the same SMTP domain with another org (orgB) still in exchange 2013
They share their calendar so a FIMSYNC is in place that synchronize User from Exchange 2013 to contact in the Exchange 2019 organization.

We have a lot of error 1003 : [Autodiscover] An internal server error occurred. The unhandled exception was: System.InvalidCastException: Unable to cast object of type 'Microsoft.Exchange.Data.Directory.Recipient.ADContact' to type 'Microsoft.Exchange.Data.Directory.Recipient.ADUser'.

I think that it is the Exchange 2013 user from ORGB that are trying to contact the autodiscover service in ORGA and as their user is a contact we have this error. We never had such errors in Exchange 2013.

Is it possible to get more logs to troubleshoot the issue?

Thanks

Jean-marc

Exchange | Exchange Server | Management
{count} votes

2 answers

Sort by: Most helpful
  1. Jean-Marc Francois 41 Reputation points
    2021-10-29T15:08:46.663+00:00

    Autodiscover point to the Exchange 2019 servers. Exchange 2013 users in ORGA have no problems.

    In ORGA there is no issue.

    As the two organizations share the same SMTP domain, users in ORGB are connecting to autodiscover.SMTPDOMAIN that is hosted in ORGA. Then the corresponding contact has a target address that redirect to OrgB. But it is a contact and I suspect that Autodiscover in Exchange 2019 doesn't support that. So we have Unable to cast object of type 'Microsoft.Exchange.Data.Directory.Recipient.ADContact' to type 'Microsoft.Exchange.Data.Directory.Recipient.ADUser'.


  2. Yaroslav Z 1 Reputation point
    2021-11-26T06:55:08.267+00:00

    Hi there,

    can you try to set attribute 'msExchVersion' value to 1125899906842624 on a cross-forest contact and check if the exception still occures?
    We have a similar setup, and have issues with cross-forest sharing between Exchange users in the trusted forests.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.