Azure Logic-app - Run query and list results V2 (Preview) - Time Range

mx-oss 61 Reputation points
2024-07-24T12:48:16.7866667+00:00

Dear Azure Community Team,

I am currently working with the Azure Logic-app - Run Query and List Results V2 (Preview) connector. I noticed that the documentation on the Azure Monitor Logs connector page does not provide details on the value that needs to be configured for the new field “Time Range type.”

User's image

User's image

User's image

Could you please provide guidance on what value should be set for this field? Any additional information or examples would be greatly appreciated.

Thank you for your assistance.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,315 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,201 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sina Salam 12,011 Reputation points
    2024-07-24T15:37:19.8233333+00:00

    Hello mx-oss,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    Problem

    I understand that you are facing challenges to configure Time Range Type and you need details on the value that needs to be configured for the new field “Time Range type.”

    Solution

    When configuring the Time Range for the Azure Logic App - Run Query and List Results V2 (Preview) connector, you'll want to select the option to "Set in query". This option allows you to specify the time range directly within your query. You can define the time range using datetime values in your query expression. In this example, the time range is set between May 22, 2020, at 00:00:00 and May 22, 2020, at 00:15:00.

    SecurityEvent

    | where ingestion_time() between (datetime(2020-05-22T00:00:00.0000000) .. datetime(2020-05-22T00:15:00.0000000))

    However, when configuring the Time Range using the GUI, follow these steps:

    1. In the Logic App Designer, open your workflow.
    2. Add the Azure Monitor Logs connector.
    3. In the Time Range type field, select Set in query.
    4. Save your workflow.

    By choosing Set in query, you’ll be able to specify the time range directly within your query.

    References

    Source: Source: Run Query and List Results Logic App - Microsoft Community Hub. Accessed, 7/24/2024Accessed, 7/24/2024

    Source: Source: Azure Monitor Logs - Connectors. Accessed, 7/24/2024 Accessed, 7/24/2024

    Accept Answer

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.

    ** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful ** so that others in the community facing similar issues can easily find the solution.

    Best Regards,

    Sina Salam


  2. Ryan Hill 28,631 Reputation points Microsoft Employee
    2024-08-08T01:38:02.6633333+00:00

    Hi @mx-oss,

    You can, for example, set Time Range Type to Relative and Time Range to Last 12 hours. Basically, like you would when querying a table in your log analytics workspace. Another option would be to set the time range in the query itself. When you set the time range in the query itself, the Time Range Type should become disabled.


    EDIT 15 Aug 2024

    Remove the action step and add it again in the portal. Time Range Type can be set to Exact or Relative.

    User's image

    User's image

    To use expressions, you can use exactTimeRangeFrom and exactTimeRangeTo or relativeTimeRange properties along with utcNow() function.User's image User's image


Your answer

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