Error from ADF pipeline loading data into Dynamics 365 table

Wayne Bartkowski 676 Reputation points
2024-05-08T05:28:41.8833333+00:00

I have an Azure pipeline that is copying data from a table in an azure sql db to a table in Dynamics 365 CE. The D365 has MFA attached so I am using an azure service principal in the linked service connection for the pipeline. The Service principal is registered etc and is a user with read write privileges in the D365 environment. With this service principle I can read the existing data from the D365 table fine, test connection also works of course.

But when I run the copy activity via debug the job fails with the error below:

ErrorCode=DynamicsOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Dynamics operation failed with 
error code: -2147158768, error message: We didn’t find that application ID 373aabc-123-423-ghfd-999c02666 in your Azure Active 
Directory (Azure AD) with CorrelationID abcrf56-bcdf-ghbn-a678-0athgrze. Make sure your application is registered in Azure AD..,
Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,''Type=System.ServiceModel.FaultException`1
[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]],
Message=The creator of this fault did not specify a Reason.,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,'

When we check for the application id 373aabc-123-423-ghfd-999c02666 in the Entra all applications blade filtered to all applications it is not found in the Azure Subscription where the Azure Data Factory is located.

How would I find what the name of this app id is, from what i have read it appears the data factory and service principal are in one tenancy while the D365 is in a different one but I am assured by admin that there is only one tenancy - although I don't have permissions to check both Entra and Power Platform
Admin Centre. Can someone point me to where else I can look to resolve this issue.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,761 questions
0 comments No comments
{count} votes

Accepted answer
  1. ShaikMaheer-MSFT 38,201 Reputation points Microsoft Employee
    2024-05-12T14:19:03.6133333+00:00

    HI Wayne Bartkowski,

    Got it. Great found. Thank you so much for sharing this with community as well.

    As you cannot accept your own answer. Post your answer below. Please consider hitting Accept Answer. Accepted answers helps community as well. Thank you.

    Found the issue - the number - 373aabc-123-423-ghfd-999c02666 - is a GUID or Dynamics Unique Identifier that was inadvertently in the data being loaded, although the error message is a bit confusing this was causing the problem.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. ShaikMaheer-MSFT 38,201 Reputation points Microsoft Employee
    2024-05-08T12:24:43.69+00:00

    Hi Wayne Bartkowski,

    Thank you for posting query in Microsoft Q&A Platform.

    We need to create an application registration and then grant permissions to that application registration in Dynamics 365. And then use that application registration in linked service of ADF.

    In your error, i could see app id 373aabc-123-423-ghfd-999c02666. Is this the application or service principle which you are using in linked service? It seems product not able to find any app id with it.
    Recheck you linked service settings and also, if possible, could you please try with fresh another app id to perform above mentioned steps and see if that helps.

    Please let me know how it goes.


  2. Wayne Bartkowski 676 Reputation points
    2024-05-09T22:54:54.8+00:00

    Found the issue - the number - 373aabc-123-423-ghfd-999c02666 - is a GUID or Dynamics Unique Identifier that was inadvertently in the data being loaded, although the error message is a bit confusing this was causing the problem.

    0 comments No comments