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

Announcements

No record found.

News and Announcements icon
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
    27 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 698

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 698

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 567 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans