mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-05-14 14:27:22 +00:00
Merged PR 12577: Fix Advanced Hunting with Power BI
Fix Advanced Hunting with Power BI
This commit is contained in:
commit
c78bfe7a68
@ -47,15 +47,12 @@ You first need to [create an app](exposed-apis-create-app-nativeapp.md).
|
|||||||
let
|
let
|
||||||
|
|
||||||
Query = "MachineInfo | where EventTime > ago(7d) | summarize EventCount=count(), LastSeen=max(EventTime) by MachineId",
|
Query = "MachineInfo | where EventTime > ago(7d) | summarize EventCount=count(), LastSeen=max(EventTime) by MachineId",
|
||||||
|
|
||||||
AdvancedHuntingUrl = "https://api.securitycenter.windows.com/api/advancedqueries/run",
|
FormattedQuery= Uri.EscapeDataString(Query),
|
||||||
|
|
||||||
Response = Json.Document(Web.Contents(
|
AdvancedHuntingUrl = "https://api.securitycenter.windows.com/api/advancedqueries?key=" & FormattedQuery,
|
||||||
AdvancedHuntingUrl,
|
|
||||||
[
|
Response = Json.Document(Web.Contents(AdvancedHuntingUrl)),
|
||||||
Query=[#"queryText"=Query]
|
|
||||||
]
|
|
||||||
)),
|
|
||||||
|
|
||||||
TypeMap = #table(
|
TypeMap = #table(
|
||||||
{ "Type", "PowerBiType" },
|
{ "Type", "PowerBiType" },
|
||||||
@ -83,7 +80,7 @@ You first need to [create an app](exposed-apis-create-app-nativeapp.md).
|
|||||||
Results = Response[Results],
|
Results = Response[Results],
|
||||||
Rows = Table.FromRecords(Results, Schema[Name]),
|
Rows = Table.FromRecords(Results, Schema[Name]),
|
||||||
Table = Table.TransformColumnTypes(Rows, Table.ToList(TypedSchema, (c) => {c{0}, c{2}}))
|
Table = Table.TransformColumnTypes(Rows, Table.ToList(TypedSchema, (c) => {c{0}, c{2}}))
|
||||||
|
|
||||||
in Table
|
in Table
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user