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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Metadata for Dynamics 365 Finance and Operation in JSON format using OData and Metadata for single Entity

(0) ShareShare
ReportReport
Posted on by

Hi Everyone

I am trying to get the Metadata from D365 FnO in JSON format using the Odata protocol but problem is, it giving an error. Self referencing loop detected for property 'Container' with type 'Microsoft.OData.Edm.Library.EdmEntityContainer'. Path 'EntityContainer.Elements[0]'. - This is the error message I get when trying to use this URL : InstanceURL/data/$metadata?$format=application/json.

I read on OData documentation that application/json and json are both recognized as valid argument for format query and format query has precedence over request Headers.
If I try to get metadata of a single Entity using the URLs that Odata sends in data response, something like : "@odata.context" :"InstanceURL/data/$metadata#[EntityName]". Entity name is not honored in such a case.
so my question is : 1. Is there a way to get JSON format metadata from D365 FnO since XML format is way to big in size and takes a lot of time.
2. Is there a different syntax for getting metadata of a single entity.
Let me know if any other information is needed.
All is appreciated. 
Thanks!
I have the same question (0)
  • WillWU Profile Picture
    22,361 on at

    Hi A.D.I.T.Y.A. ,

    As far as I know, this isn't supported by the specification. The $metadata document is in the CSDL format, which is only available in XML format, not JSON.

    You have to parse XML by yourself. You could use some of the third-party libraries to do this.

  • Community Member Profile Picture
    on at

    Hi Will

    Thanks for the response. If this helps the error type is -> Newtonsoft.Json.JsonSerializationException under innererror response.

    Is this not supported by the MS D365 FnO? I am asking this question because other application that use Odata can send metadata in JSON format for a single Entity. I am receiving this specific error response and type when specifying format in URL or application/json in headers.

    Is there any workaround for this? Metadata document in XML is taking forever to load. It is around 25 MB in size :D.

    I am not that familiar with MS FnO but is there any system level change or something that I can do in FnO instance to get around this error.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 549 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans