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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Recurrence integration - Import in D365FO (2)

(1) ShareShare
ReportReport
Posted on by 854

Hi team,

Continuing the thread 

https://community.dynamics.com/forums/thread/details/?threadid=69d681dc-d39d-f111-b8dc-6045bda97caf

I do research and trying to implement the below steps to import the file in D365fo through recurrence integration with logic apps.

 

Step 1. Third party application send the file in an Azure Blob Storage container.

 

.The Logic App has a Blob Storage trigger. I mean When a blob is added the logic app strats.

 

Step 2.  Logic App gets the file-
I mean Logic App reads the file from Blob Storage. Where we will do the validations.

 

Step 3. Now we need to Authenticate with D365FO
I mean the Logic App calls D365FO using OAuth 2.0 / Microsoft Entra ID authentication.

 

Step 4- Then we need to upload the file in blob storage for write.

 

Step 5- Now we start import process 

Import from package 

Needs to pass parameters like 

packageUrl
definitionGroupId
executionId
legalEntityId

 

Here the definitionGroupId is basically the DMF data project that tells D365FO which entities/mappings should be used for the import.

 

Step 6- DMF process the data.

 

Step 7 - We needs to check the status.

Get execution summary status

 

Is my assumption is correct?

Pls advise, thanks 


       

 

Categories:
I have the same question (0)
  • Suggested answer
    SajeedMullaji Profile Picture
    578 on at

    @CU10121822-0 
    your conceptual flow is on the right track but there are three critical gaps that will cause it to fail in production:

    Gap 1 — Raw file vs ZIP package
    ImportFromPackage does not accept raw xlsx, csv, or json files. You must zip the data file together with a PackageHeader.xml and Manifest.xml before calling the API. The Logic App needs a step to create this zip package dynamically.

    Gap 2 — Missing GetAzureWriteUrl call
    You cannot upload to your own blob storage and pass that URL to D365. You must first call GetAzureWriteUrl to get a secure temporary upload URL within Microsoft's managed storage, then upload your zip to that URL.

    Gap 3 — Step 7 must be a polling loop not a single call
    ImportFromPackage queues a batch job — it does not return an immediate result. Your Logic App must enter a Do-Until loop calling GetExecutionSummaryStatus every 20-30 seconds until the status returns Succeeded, Failed, PartiallySucceeded, or Canceled.

    Corrected complete sequence:

    Blob trigger fires — raw file received

    Create zip package — bundle data file + PackageHeader.xml + Manifest.xml

    Authenticate — get Bearer token via Entra ID OAuth 2.0

    Call GetAzureWriteUrl — POST to /data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GetAzureWriteUrl with uniqueFileName — response returns a BlobUrl

    Upload zip — HTTP PUT to the BlobUrl with header x-ms-blob-type: BlockBlob — body is raw binary zip content

    Call ImportFromPackage — POST with packageUrl, definitionGroupId, executionId (your generated GUID), legalEntityId

    Poll GetExecutionSummaryStatus — Do-Until loop every 30 seconds with your executionId until final status returned

    The x-ms-blob-type: BlockBlob header in Step 5 is critical — Azure Storage will reject the upload without it.

    If Helps, Mark Answered.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
SajeedMullaji Profile Picture

SajeedMullaji 531

#2
Martin Dráb Profile Picture

Martin Dráb 303 Most Valuable Professional

#3
CU10121822-0 Profile Picture

CU10121822-0 290

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans