Output JSON to Blob Storage
Describe the Bug
We are using Logic App Standard to output to Blob Storage. We have a Logic App that sends a JSON file to blob storage. We are using the Built In Connector and this all must run within a VNet, so the Managed Connector will not work. This has been working fine until recently.
Now when files are output, the Content-Type defaults to application/octet-stream. Previously, this was outputting as application/json; charset=UTF-8. We haven't done any code deployments, but now we are getting different results. The Built In Connector does not have the ability to add a Content-Type, the Managed Connector does, but this is not an option.
How can we output to blob storage and specify the Content-Type? Is this no longer possible or what has changed on the backend to prevent us from using application/json?
Plan Type
Standard
Steps to Reproduce the Bug or Issue
Create a new Workflow and add the following:
- HTTP Request
- Add a Blob Storage Action - use Upload blob to storage container and use the body of the incoming Request
- HTTP Response with the results
this will create a entry in Blob Storage with the Content-Type of application/octet-stream
Workflow JSON
No response
Screenshots or Videos
No response
Additional context
This is now running in a Production environment for a Client, so need to try and understand how we can get this back to how it was previously running.
AB#17367408
Adding screenshot capture of delta in behavior in production environment.
Working example 21 Feb 23

Changed behavior the following evening 22 Feb 23. No code deployment was performed in the intervening time.

This undocumented change in behavior reached our lower environments earlier around 15 Feb 23 in advance of the production failures.
Hi @mikeholdorf, Could you please let me know if you are still seeing same behavior(outut content-type as 'application/octet-stream') for built-in blob connector action 'Upload to storage container'?
Hi @mikeholdorf, Could you please let me know if you are still seeing same behavior(outut content-type as 'application/octet-stream') for built-in blob connector action 'Upload to storage container'?
@saroja-sattigeri Hi. I've been working with Mike to address this issue, and I'm seeing a reversion to the previous behavior with application/json; charset=UTF-8 as the content type in our development environment as pictured below. This run was from two hours prior to this comment.

However, the same workflow running in our production deployment still exhibits previous behavior. It ran simultaneously with the development deployment.

Is it possible a change is still rolling out to all logic app service hosts?
Hi @lsuarez5280, Thanks for your response. Yes, i have also tested at my end and it works fine(returns application/json as content-type). Could you verify if app setting 'FUNCTIONS_EXTENSION_VERSION' is set to ~4 in your production deployment?
@saroja-sattigeri I'm outputting our runtime settings below, but development and production environments have configuration parity.
[
{
"name": "AzureFunctionsJobHost__extensionBundle__id",
"value": "Microsoft.Azure.Functions.ExtensionBundle.Workflows",
"slotSetting": false
},
{
"name": "AzureFunctionsJobHost__extensionBundle__version",
"value": "[1.*, 2.0.0)",
"slotSetting": false
},
{
"name": "FUNCTIONS_EXTENSION_VERSION",
"value": "~4",
"slotSetting": false
},
{
"name": "FUNCTIONS_WORKER_RUNTIME",
"value": "node",
"slotSetting": false
},
{
"name": "WEBSITE_ENABLE_SYNC_UPDATE_SITE",
"value": "true",
"slotSetting": false
},
{
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"value": "~14",
"slotSetting": false
},
{
"name": "WEBSITE_RUN_FROM_PACKAGE",
"value": "1",
"slotSetting": false
}
]
Hi @lsuarez5280, Thanks for sharing app settings list.
I tested the behavior by sending different type of content as part of trigger payload(other than json content type) and i see that output content type would be having the same content which trigger has sent to blob action.
Hence, could you please verify what is the content type passed as trigger outputs in development and production environment?

@saroja-sattigeri The output of the production HTTP response body we're writing to blob is the correct Content-Type.
{
"statusCode": 200,
"headers": {
"Cache-Control": "no-cache",
"Pragma": "no-cache",
"Date": "Wed, 15 Mar 2023 04:05:28 GMT",
"Content-Type": "application/json; charset=utf-8",
"Expires": "-1",
"Content-Length": "1669"
},
"body": [
{
"...": "..."
}
]
}
The Body output from that step is then wrapped in a property because it is a JSON array, and the corresponding built-in readBlob action from the AzureBlob service provider that picks up the file makes a baseless assumption when serializing that it will always receive a JObject from the Newtonsoft.Json library instead of a JArray as in my original HTTP response. Therefore, we transform the payload a bit and specify the create blob task as follows:
{
"inputs": {
"parameters": {
"containerName": "@parameters('Blob_Container_Name')",
"blobName": "myfile.json",
"content": {
"data": "@body('HTTP')"
}
},
"serviceProviderConfiguration": {
"connectionName": "AzureBlob",
"operationId": "uploadBlob",
"serviceProviderId": "/serviceProviders/AzureBlob"
}
}
}
At this time, the production instance continues to output application/octet-stream content from the uploadBlob action.
Hi @lsuarez5280 , Sorry for the delayed response. I checked with product group, they would work on adding as an optional feature for content-type in 'upload' built-in blob action and will share bundle by end of august. Thank you!
Hi @lsuarez5280 , Sorry for the delayed response. I checked with product group, they would work on adding as an optional feature for content-type in 'upload' built-in blob action and will share bundle by end of august. Thank you!
Any update on this as I believe this issue is related to what my customer is experiencing as documented at https://github.com/Azure/logicapps/issues/794. Thanks
I am experiencing this same issue with the v2 blob connector, I have set the "content-type" advanced parameter as application/json but the new blob is application/octet-stream. Is there any news on a fix for this?
See also: https://github.com/Azure/logicapps/issues/1128
Same bug in Power Automate going back about 2 years: https://community.powerplatform.com/forums/thread/details/?threadid=2f8b7cba-bc88-4ff6-9dd8-23490abf3321
This seems to be a long-standing issue with the v2 blob connector.