Built-in Service Bus trigger converts datetime values in JSON payload
See original GitHub issueDescribe the Bug
I have a solution where one Logic App sends a message to a Service Bus queue, and another Logic App, using the “When messages are available in a queue”-trigger, processes them. The problem occurs when sending a JSON object with a property containing a datetime value without time zone indicator.
As a reduced example, I sent:
{
"date": "2023-01-01T00:00:00"
}
to the queue, but on the receiving end, my message looks like this:
{
"date": "2022-12-31T23:00:00Z"
}
So, somewhere along the way, the datetime value gets implicitly treated as UTC and then serialized with the Z-suffix. I fully expect that data sent to a queue should be received in an identical state, and this kind of mangling has a potential for causing issues.
As an experiment, I used the C# SDK to retrieve the same message from the same queue, and that time the message had the expected, original content.
Plan Type
Standard
Steps to Reproduce the Bug or Issue
Create a workflow that sends a message to Service Bus Ensure that the workflow sends a property containing a datetime value without time zone indicator Create a workflow that receives a message from Service Bus Trigger the first workflow Observe the mangled data
Workflow JSON
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Compose": {
"type": "Compose",
"inputs": "@triggerOutputs()?['body']?['contentData']",
"runAfter": {}
}
},
"triggers": {
"When_messages_are_available_in_a_queue": {
"type": "ServiceProvider",
"inputs": {
"parameters": {
"queueName": "queue1",
"isSessionsEnabled": false
},
"serviceProviderConfiguration": {
"connectionName": "serviceBus",
"operationId": "receiveQueueMessages",
"serviceProviderId": "/serviceProviders/serviceBus"
}
},
"splitOn": "@triggerOutputs()?['body']"
}
},
"contentVersion": "1.0.0.0",
"outputs": {}
},
"kind": "Stateful"
}
Screenshots or Videos
No response
Additional context
No response
AB#17312327
Issue Analytics
- State:
- Created 7 months ago
- Reactions:1
- Comments:12
MSFT Support team have confirmed that this is an issue via MSFT Ticket: 2306210030002343 and are investigating potential options.
Hi @jdelforno, As product group is looking into other options for above behavior in MS ticket just wanted to check if any further concerns before closing this Github issue?