Forum Discussion
Dynamics 365 Web API $expand is not working
Hi,
following query is not working in Power BI Desktop:
https://contoso.api.crm4.dynamics.com/api/data/v8.2/opportunities()?$select=name,createdon&$expand=owningteam($select=teamid,name)&$top=10
I get an error message like:
The entity instance value of type 'Microsoft.Dynamics.CRM.team' doesn't have a value for property 'ownerid'. To compute an entity's metadata, its key and concurrency-token property values must be provided.
Any idea why it is working in the web browser but not in Power BI Desktop?
THX
3 Replies
- v-yulgu-msftMicrosoft Employee
Hi mike2k,
Did you query data via appending additional URL parts to Dynamics 365 Web API?
From the error message, it prompts that you need to add token as URL parameter.
Regards,
Yuliana Gu
- mike2kFrequent Visitor
Nope, I give the full URL string at once - no addtitional URL parts are used:
https://contoso.api.crm4.dynamics.com/api/data/v8.2/opportunities()?$select=name,createdon&$expand=owningteam($select=teamid,name)&$top=10
- v-yulgu-msftMicrosoft Employee
Hi mike2k,
Based on my research, I found that this might be a known issue that
"When using $expand query option with $select which excludes key and / or concurrency properties,
the response fails with "The entity instance value of type 'ODataRoutingDemo.Models.Discipline' doesn't have a value for property 'Id'. To compute an entity's metadata, its key and concurrency-token property values must be provided." error."Please contact with OData support team to check whether there existing any workaround and when this issue will be fixed.
Regards,
Yuliana Gu