Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JZR
New Member

expanding column error: JSON file/OData error

I am connecting Power Bi to Dynamics 365.  When I attempt to expand columns in the appointment entity, I receive the error below.  It does not matter which field I am attempting to expand or the which field I check off to include in the expansion.  This error does not occur for any other table or entity that I bring in.  Any guidance is appreciated!

 

First part of the error:  

Unexpected error: When writing a JSON response, a user model must be specified and the entity set and entity type must be passed to the ODataMessageWriter.CreateODataEntryWriter method or the ODataFeedAndEntrySerializationInfo must be set on the ODataEntry or ODataFeed that is being written.
Details:
Microsoft.Mashup.Evaluator.Interface.ErrorException: When writing a JSON response, a user model must be specified and the entity set and entity type must be passed to the ODataMessageWriter.CreateODataEntryWriter method or the ODataFeedAndEntrySerializationInfo must be set on the ODataEntry or ODataFeed that is being written. ---> Microsoft.OData.Core.ODataException: When writing a JSON response, a user model must be specified and the entity set and entity type must be passed to the ODataMessageWriter.CreateODataEntryWriter method or the ODataFeedAndEntrySerializationInfo must be set on the ODataEntry or ODataFeed that is being written. ---> Microsoft.OData.Core.ODataException: When writing a JSON response, a user model must be specified and the entity set and entity type must be passed to the ODataMessageWriter.CreateODataEntryWriter method or the ODataFeedAndEntrySerializationInfo must be set on the ODataEntry or ODataFeed that is being written.
at Microsoft.OData.Core.Evaluation.ODataConventionalEntityMetadataBuilder.ComputeAndCacheId()

 

1 ACCEPTED SOLUTION
v-xjiin-msft
Solution Sage
Solution Sage

Hi @JZR,

 

Based on my research, there's one possibility about this error. 

 

If context URL returns a collection of entities, the above error would occur, you would need to get entityset as described in the following similar thread, then re-connect to the OData data source in Power BI Desktop.

 

https://stackoverflow.com/questions/35572590/odata-function-returning-a-collection-of-entities-fails... 

 

Thanks,
Xi Jin.

View solution in original post

1 REPLY 1
v-xjiin-msft
Solution Sage
Solution Sage

Hi @JZR,

 

Based on my research, there's one possibility about this error. 

 

If context URL returns a collection of entities, the above error would occur, you would need to get entityset as described in the following similar thread, then re-connect to the OData data source in Power BI Desktop.

 

https://stackoverflow.com/questions/35572590/odata-function-returning-a-collection-of-entities-fails... 

 

Thanks,
Xi Jin.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.