Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Built-in Service Bus trigger converts datetime values in JSON payload

See original GitHub issue

Describe 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


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": "",
        "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": "",
        "outputs": {}
    "kind": "Stateful"

Screenshots or Videos

No response

Additional context

No response


Issue Analytics

  • State:closed
  • Created 7 months ago
  • Reactions:1
  • Comments:12

github_iconTop GitHub Comments

jdelfornocommented, Jul 4, 2023

MSFT Support team have confirmed that this is an issue via MSFT Ticket: 2306210030002343 and are investigating potential options.

saroja-sattigericommented, Jul 12, 2023

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Service Bus trigger for Azure Functions
Use the Service Bus trigger to respond to messages from a Service Bus queue or topic. Starting with extension version 3.1.0, you can...
Read more >
DateTime's offset gets lots when Service Bus message ...
It seems like Azure Function recognizes body type as JSON and automatically converts it to object - and date with offset string to...
Read more >
Call Azure Functions from workflows - Logic Apps
This example specifies that the context payload contains a property named content that has the From token's value from the email trigger.
Read more >
Azure – Page 2
The Azure function which had the ServiceBusTrigger, IsSessionsEnabled = false inserted the rows out of order due to multiple function instances competing for ......
Read more >
Azure Functions Archives
Finally, this function allows you to convert the DateTime format into another DateTime format. The function receives a JSON payload with three properties:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found