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

DMF import of XML file works manually, but fails when using API with "XML is not in correct format"

(0) ShareShare
ReportReport
Posted on by 25

I am trying to import XML files to a custom entity. These are 855 EDI files in XML format with custom header and line entities. When I run the DMF package manually in the Data Management screen, the import works fine with no errors. However, when I try to import using the API using the "data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.ImportFromPackage" endpoint, it fails with an "XML is not in correct format" error. I am using the exact same file in both cases. I have verified mapping and that the manifest & packageheader files being included in the zip being passed to the endpoint are correct. I've played around with encoding, but that doesn't appear to be the issue. I've also verified that there are no hidden special characters in the file that I can see. And as I mentioned, the exact same file loaded manually imports just fine. I'm not sure what else to try.

I have the same question (0)
  • nunomaia Profile Picture
    25 Moderator on at

    Are you executing those package in parallel by calling ImportFromPackage  ? If it's the case, enable this option in Data Management Parameters    

    pastedimage1672764799269v1.png

  • Barret Profile Picture
    25 on at

    It's happening even when I run one file with a single import. But I tried turning that option on and it started failing with a different error.

    Exception occurred while executing action ImportFromPackage on Entity DataManagementDefinitionGroup: A data project must exist before importing a package consisting of a composite data entity

    But the project still exists. Do I need to recreate the data project after turning that option on?

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
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 420 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 241 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans