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'