for first-time load of Account data into Dynamics 365 using Azure Data Factory (ADF).

Nagalakshmi Pradeep 0 Reputation points
2025-06-19T14:11:57.5166667+00:00

for first-time load of Account data into Dynamics 365 using Azure Data Factory (ADF).

I have a CSV file as source which has Account information. I need to import the Accounts from the CSV file into Dynamics 365 Account table.

One of the column is parent account Lookup in Account table.

The source file does not have the parent account GUID to lookup in Dynamics instead file has account code.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,624 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Chandra Boorla 14,585 Reputation points Microsoft External Staff Moderator
    2025-06-19T17:55:10.3966667+00:00

    @Nagalakshmi Pradeep

    To load Account data into Dynamics 365 using Azure Data Factory, especially when the parent account information in your CSV is stored as an account code (not a GUID), you'll need to implement a reference resolution step, as Dynamics 365 expects the GUID for lookup fields like parentaccountid.

    Here are the steps that you can try:

    Load Accounts Without Parent First - Start by identifying and loading records that don’t have a parent account (i.e., root accounts).

    Resolve Parent Account GUIDs - For accounts that do have a parent account code:

    • Perform a Lookup in Dynamics 365 using the account code (you may need a custom field like new_accountcode in Dynamics).
    • Retrieve the corresponding account GUID.

    Set Lookup Field in ADF - While loading the child accounts:

    • Use the resolved parent account’s GUID to populate the parentaccountid field.
    • This is done using the format: ******@odata.bind = /accounts(GUID)

    Optional - Use a staging area or ADF Mapping Data Flow to perform joins between your CSV and the parent account GUIDs for better control.

    Load Data into Dynamics 365 - Use the Dynamics 365 connector in ADF to push the transformed data into the Account table.

    Test and Validate - Run the pipeline and verify that accounts and their parent-child relationships are loaded as expected.

    I hope this information helps. Please do let us know if you have any further queries.

    Kindly consider upvoting the comment if the information provided is helpful. This can assist other community members in resolving similar issues.

    Thank you.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.