Users who are assigned the RBAC role type MyMailboxDelegation are unable to change their passwords through Outlook on the web in Microsoft Exchange Server 2019 or Exchange Server 2016. In addition, an exception is recorded:
Method invocation target threw an exception: System.InvalidCastException: Unable to cast object of type 'Microsoft.Exchange.Data.Directory.ADRawEntry' to type 'Microsoft.Exchange.Data.Directory.ADObject'
To fix this issue, install one of the following updates:
For Exchange Server 2019, install the Cumulative Update 7 for Exchange Server 2019 or a later cumulative update for Exchange Server 2019.For Exchange Server 2016, install the Cumulative Update 18 for Exchange Server 2016 or a later cumulative update for Exchange Server 2016.