web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

$Expand does not expand all cases

(0) ShareShare
ReportReport
Posted on by

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?

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
DAnny3211 Profile Picture

DAnny3211 134

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 132

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 70 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans