逻辑应用程序,将运行查询json结果转换为可用/可读的输出(html/excelish?)以在Sentinel注释中使用以丰富

问题描述 投票:0回答:1

我创建了一个逻辑应用程序,可在 Sentinel 中使用,以实现丰富性和自动化。在本例中,它是一个针对基于身份的事件(即“陌生登录”)的自动化应用程序,但该应用程序实际上运行良好。在应用程序中,我有时使用“运行查询并列出结果”操作运行 kql 查询。查询有效,我可以看到 json 格式的输出。现在,通过我使用原始输出值,并在我的 Sentinel 评论中使用它,我确实看到了结果,只是它不是您可以想象的最佳格式。

查询根据事件中看到的用户代理查找登录事件,过滤使用代理并查找过去看到用户代理的事件,根据应用程序、用户代理进行摘要,并显示结果,这非常适合事件丰富。结果可能会有所不同,有时没有结果,因为过去几天/几周没有看到用户代理,其他时候有 4 行有结果,所以它非常动态。

我正在寻找一种方法,使查询的输出结果以 JSON 格式,更可用、更易读,也许是 html 格式,并在事件中使用它,或者其他更易读的格式。

我正在使用的查询:

SigninLogs
| where UserPrincipalName == "<the upn variable>" // Replace with the specific user's UPN
| where UserAgent == "<the user-agent variable>" // Replace with the specific User-Agent string you're interested in
| where TimeGenerated between(ago(31d)..ago(1d)) // Filters to records from the last 30 days, excluding today
| summarize Count = count() by UserAgent, UserPrincipalName, AppDisplayName
| where Count > 0
| order by Count desc // Optional: Orders the results by count in descending order
| project Count, AppDisplayName, UserAgent, UserPrincipalName

我在网上找到了几篇帖子,其中或多或少对此进行了解释,但是我无法理解或说明不正确;)

有人可以给我一些好的建议吗?

问候! 你的朋友

尝试使用数组变量等,但无法将互联网说明反映到我的情况。

azure-logic-apps powerapps kql azure-automation azure-sentinel
1个回答
0
投票

只是它不是你能想象的最好的格式。我正在寻找一种方法来制作查询的输出结果,它是JSON格式的,更可用,更可读,也许是html格式,并在事件中使用它,或者其他更具可读性的东西。

是的,在逻辑应用程序中,有很多方法可以将其变成可读格式,下面是我的

design
:

enter image description here

Output:

enter image description here

使用 CSV 表连接器显示可读数据:

enter image description here

使用 HTML 表连接器显示可读数据:

enter image description here

不仅如此,逻辑应用程序中还有许多用于设计表格的连接器。

© www.soinside.com 2019 - 2024. All rights reserved.