Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Queries Azure Monitor activity and sign-in logs via KQL to detect privilege escalation and suspicious admin operations.
Use this skill ↓0% 9%+9 ptsof test cases passed
Passed 2 of 22 test cases with the skill, and 0 of 22 without it.
3 of 3 safety checks passed
18 agent runs
1 forkA fork is a copy of this skill that someone made so they could edit it for their own use. The original doesn't change.
Use azure-monitor-query to execute KQL queries against Azure Log Analytics workspaces, detecting suspicious admin operations and sign-in anomalies.
from azure.identity import DefaultAzureCredential
from azure.monitor.query import LogsQueryClient
from datetime import timedelta
credential = DefaultAzureCredential()
client = LogsQueryClient(credential)
response = client.query_workspace(
workspace_id="WORKSPACE_ID",
query="AzureActivity | where OperationNameValue has 'MICROSOFT.AUTHORIZATION/ROLEASSIGNMENTS/WRITE' | take 10",
timespan=timedelta(hours=24),
)
Key detection queries:
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.