For example, I want to order the returned list based on a property from the child but I'm getting
{"error":{"code":"0x0","message":"Object reference not set to an instance of an object."}}
This request return me the error when want to get a list of opportunities sorted by the related account's name.
https://xxx.api.crm.dynamics.com/api/data/v9.2/opportunities?$expand=parentaccountid&$top=5&$orderby=parentaccountid/name