I have table with contacts in d365, some of them have expandable fields, aka expandable field is not null.
For example, also the problem:
API call
https://yyy.crm4.dynamics.com/api/data/v9.2/contacts?$filter=(yyy_tag_contact_ent/any(s%3A%20s/yyy_name%20eq%20'Agent'))&$expand=yyy_tag_contact_ent($select%3Dyyy_name)
returns 11 cases of contacts with expandable yyy_tag_contact_ent field, where yyy_name = 'Agent'
and one of those contacts is contactid = 001, others are contactid =002..011
But when I do API call
https://yyy.crm4.dynamics.com/api/data/v9.2/contacts?$expand=yyy_tag_contact_ent($select%3Dyyy_name)
I get all contacts, also those who has not expandable yyy_tag_contact_ent field, but only contactid=002..011 get yyy_tag_contact_ent field expanded, while contactid = 001 has null /yyy_tag_contact_ent/: []. Yet next field /yyy_tag_contact_ent@odata.nextLink/: /https://yyy.crm4.dynamics.com/api/data/v9.2/contacts(001)/yy_tag_contact_ent?$select=yyy_name/ , gives correct result.
And when I filter only contactid=001 https://yyy.crm4.dynamics.com/api/data/v9.2/contacts?$filter=(contactid%20eq%20001&$expand=yyy_tag_contact_ent($select%3Dyyy_name)
I also get correct result with expandable yyy_tag_contact_ent field.
Endpoint https://yyy.crm4.dynamics.com/api/data/v9.2/yyy_tags?$expand=yyy_tag_contact_ent
has only yyy_name = Agent with expandable yyy_tag_contact_ent field
Where is the problem?