This blog will guide logic app users to transition from using Data Collector connector to using HTTP connector to utilize the Log Ingestion API to send data to custom log tables
HTTP Data Collector API in Log Analytics workspaces is being deprecated, and will be totally out of support in September 2026.
Data Collector actions in logic app using already created API connections (which uses workspace Id & Key) would still work against old custom log tables, however, newly created table will not be able to ingest data, although the connector would still succeed in logic app, but no data will be populated in newly created custom logs.
In case new API connection is created for Data Collector action (using workspace Id & Key); these will fail with 403 - Forbidden action.
Users should start using the Log Ingestion API to send data to custom tables, and this document will guide users on how to use Log Ingestion API in logic apps.
Note: Azure portal currently is update so it doesn't show the Workspace keys in Log Analytics workspace page, however, Az CLI will still get the keys, but as stated, actions will fail with 403 when using them in Data Collector Action.
Creating DCE & DCRs:
To utilize the Log Ingestion API, Data Collection Endpoint & Data Collection Rule should be created first.
DCE Creation is simple, from azure portal search for DCE, and then create a new one:
For DCR creation, it can be either created from the DCR page in Azure Portal, or upon creating the custom log in Log Analytics workspace.
DCR Popup
You need to upload sample data file, so the custom log table has a schema, it needs to be JSON array. In case the sample log doesn't have a TimeGenerated field, you can easily add it using the mapping function as below:
Add the below code in the Transformation box, then click run.
Once you complete the DCR creation, we need to get the DCE full endpoint.
Getting DCE Log Ingestion Full URL
To get the full endpoint URL, please follow the below:
1. Get the DCE Log Ingestion URL from the DCE overview page:
2. On the DCR Page, get the immutable id for the DCR., then click on the JSON view of the DCR resource:
3. From the JSON view, get the stream name from the streamDeclarations field
Now the full Log Ingestion URL is:
DCE_URL/dataCollectionRules/{immutable_id}/streams/{streamName}?api-version=2023-01-01
It would be similar to:
https://mshbou****.westeurope-1.ingest.monitor.azure.com/dataCollectionRules/dcr-7*****4e988bef2995cd52ae/streams/Custom-mshboulLogAPI_CL?api-version=2023-01-01
Granting Logic App MI needed IAM Roles:
To call the ingestion endpoint using Logic Apps MI, we need to grant logic apps MI the role "Monitoring Metrics Publisher" over the DCR resource. To do this, open the DCR, from the blade choose Access Control (IAM), and then grant the logic app MI the role "Monitoring Metrics Publisher"
Calling Log Ingestion Endpoint from logic apps:
To call the ingestion endpoint from logic apps, we need to use the HTTP action, as below, the URI is the full DCE Endpoint we created before. Add the content-type headers, and the json body that contains the log data you want to send.
For the authentication, it will be as below:
Once executed, it should succeed, with status code 204.
For more details on the Log Ingestion API, and the migration, please see our documentation:
Migrate from the HTTP Data Collector API to the Log Ingestion API - Azure Monitor | Microsoft Learn
Logs Ingestion API in Azure Monitor - Azure Monitor | Microsoft Learn
Thanks.