Azure Data Factory O-Data connector with service principal/key

mapleloops 1 Reputation point
2022-05-23T08:50:53.34+00:00

Hey,

we are currently onboarding a data source through o-data. On the azure tenant where the source (Business Central) is hosted, we created an app registration with a service principle including the secret/key creation. In the settings we gave the right read access to the APIs from business central and from a business central side, the APIs are also published.

We got confused what values needs to be entered in the o-data template in data factory (see picture below) since we did not get the connection to work and the documentation is also not very clear where to find the right detail.

  • In the service URL we put in the o-data address generated by business central
  • Authentication type is "Service principal with Key" as mentioned
  • AAD resource we put in the application ID / client ID of the app registration
  • Tenant we put in the tenant ID of the azure tenant where business central is running and the API was generated
  • Service principal ID we put in again the application ID / client ID of the app registration
  • Service principal key we put inthe value of the created secret

Can you please verify which information is needed for the separate boxes and where I find it? Especially the AAD resource and Service principle ID gives me some difficulties to understand where to find.
If entered as above, we get the error message

Error code: 23210
Details: Failed to create odata connection to RequestUrl. Failed to get metadata of odata service, please check if service url and credential is correct and your application has permission to the resource. Expected status code: 200, actual status code: BadRequest, response is : {"error": {"code": "RequestDataInvalid","message": "Request data is invalid."}}.
----
If I add the object ID in the AAD resource and the Secret ID as Serpice principal ID I get the following message:
Failed to create odata connection to RequestUrl. Failed to get access token by using service principal. Error: unauthorized_client, Error Message: AADSTS700016: Application with identifier 'SECRET ID' was not found in the directory 'TENANT'. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.

204604-image.png

Many thanks for your support here

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
{count} votes

Your answer

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