Retrieve 1:n relationship records from ODATA4

Hi Team,

We want to retrieve a specific record by Id along with all the related elements (eg - Retrieve Account A with all of its related Contacts). 

What we already know:

We can retrieve the account record itself along with related records that are linked with lookupfields, like the PrimaryContact



This works, but it returns only one contact, the primary one.


Instead, we need an embedded list of contacts, like

    "Id": "22222-222222-2222-222222-22222207ba6",
    "Name": "somename",
    "OwnerId": "111111-11111-11111-11111-1111111",
    "CreatedOn": "2022-11-16T21:11:57.214167Z",
    "Contacts“ : [
{object}, {object}

Given the first URL in the response, we expected that all NavigationProperties would behave the same:

But this collection:

Is not accessible. If we call for :



We get this error in return:

    "error": {
        "code": "",
        "message": "An error has occurred."

If we use other expand values, we retrieve meaningful errors like „Could not find a property named xy“, but this error is not self explaining. How can we return an object with an embedded list of children? I know that in this example we also could ask for a list of Contacts filtered by their account, but we cannot do that in all scenarios we have in mind.

Thank you


Like 3



Hello Petrika,


This property cannot be used to retrieve all contacts related to the account and can be used in filtration only. To retrieve related contacts you need to perform the GET query to the Contact object with the correspondent AccountId filter. Using this approach you will be able to get contacts needed.

Show all comments