agentleFS
soulemikesoulemike/microsoft-skills/skills/sentinel/SKILL.md

sentinel

Skill2 starsChanged 3 months agoMITView on GitHub

Use this skill for Microsoft Sentinel management-plane automation over Azure Resource Manager, including incidents and analytic rules.

12 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill for Microsoft Sentinel management-plane tasks that run through the Microsoft.SecurityInsights ARM provider.

    line 22
  2. Distinctive:

    Call workspace-scoped Sentinel management endpoints when no higher-level wrapper exists.

    line 27
  3. Very specific:

    Use an ARM context with the least privilege required, such as Microsoft Sentinel Reader for read-only workflows.

    line 73
  4. Very specific:

    Do not confuse Sentinel management-plane access with Log Analytics data-plane access.

    line 74
  5. Distinctive:

    Avoid client secret auth in production when managed identity or federated credentials are available.

    line 75

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Microsoft Sentinel Skill

Agent Summary

Use this skill for Microsoft Sentinel management-plane tasks that run through the Microsoft.SecurityInsights ARM provider. You must supply an ARM-capable auth context, usually created by ./skills/azure/Connect-AzureApi.ps1.

When to Use

  • List or retrieve Sentinel incidents from a workspace.
  • Enumerate analytic alert rules through ARM.
  • Call workspace-scoped Sentinel management endpoints when no higher-level wrapper exists.

Required Parameters

Get-SentinelIncident.ps1

ParameterTypeRequiredNotes
SubscriptionIdstringYesAzure subscription hosting the workspace.
ResourceGroupNamestringYesResource group containing the workspace.
WorkspaceNamestringYesSentinel-enabled Log Analytics workspace.
AuthContexthashtableYesARM auth context, typically from Connect-AzureApi.ps1.
IncidentIdstringNoRetrieve one incident instead of listing all.
StatusstringNoClient-side filter such as New, Active, or Closed.

Get-SentinelAlertRule.ps1

ParameterTypeRequiredNotes
SubscriptionIdstringYesAzure subscription hosting the workspace.
ResourceGroupNamestringYesResource group containing the workspace.
WorkspaceNamestringYesSentinel-enabled Log Analytics workspace.
AuthContexthashtableYesARM auth context.
RuleIdstringNoRetrieve one rule instead of listing all.

Invoke-SentinelArmRequest.ps1

ParameterTypeRequiredNotes
UristringYesRelative path like /incidents or absolute nextLink.
SubscriptionIdstringYesAzure subscription hosting the workspace.
ResourceGroupNamestringYesResource group containing the workspace.
WorkspaceNamestringYesSentinel-enabled Log Analytics workspace.
AuthContexthashtableYesARM auth context.
MethodstringNoDefaults to GET.
ApiVersionstringNoDefaults to 2024-03-01.

Example Agent Prompts

  • "Query all Sentinel incidents from the last 24 hours."
  • "List all analytic alert rules for this Sentinel workspace."
  • "Call the Sentinel ARM incidents endpoint directly and return every page."

Example Agent Workflow

$ctx = ./skills/azure/Connect-AzureApi.ps1 -AuthenticationType ManagedIdentity -Environment AzureCloud -SubscriptionId $subscriptionId

$incidents = ./skills/sentinel/Get-SentinelIncident.ps1 -SubscriptionId $subscriptionId -ResourceGroupName $resourceGroupName -WorkspaceName $workspaceName -AuthContext $ctx -Status Active

Security Caveats

  • Use an ARM context with the least privilege required, such as Microsoft Sentinel Reader for read-only workflows.
  • Do not confuse Sentinel management-plane access with Log Analytics data-plane access; KQL belongs to the loganalytics skill.
  • Avoid client secret auth in production when managed identity or federated credentials are available.

Overview

This skill set runs Microsoft Sentinel operations on the management plane via ARM (Microsoft.SecurityInsights resources). It wraps authentication and request execution so you can manage incidents, alert rules, watchlists, automation rules, and data connectors consistently.

For Log Analytics data-plane operations such as KQL queries, custom table creation, workspace provisioning, and log ingestion, see the loganalytics skill.

Authentication

  • Management plane: ARM token (https://management.azure.com/)
  • The Log Analytics query/data-plane token is separate; use the loganalytics skill for KQL queries and ingestion

Endpoints

PlaneRequest EndpointToken Audience
Management (ARM)https://management.azure.com/https://management.azure.com/

Skills

FilePurpose
Invoke-SentinelArmRequest.ps1Calls workspace-scoped Microsoft Sentinel ARM resources under Microsoft.SecurityInsights and supports pagination (nextLink)
Get-SentinelIncident.ps1Retrieves Sentinel incidents via ARM, including optional status filtering and multi-page enumeration
Get-SentinelAlertRule.ps1Enumerates Sentinel analytic alert rules via ARM, including optional lookup by rule ID

Toolchain

PlaneToolBest ForToken AudienceLimitations
ManagementAz.SecurityInsights (Get-AzSentinelIncident, New-AzSentinelAlertRule)Native PowerShell for incidents, alert rules, watchlists, automation ruleshttps://management.azure.com/Module dependency; not all preview features available
ManagementAzure CLI (az sentinel)Incident, watchlist, and automation rule managementhttps://management.azure.com/Extension-based; may lag behind latest ARM API versions
ManagementRaw REST / ARM (Invoke-AzRestMethod)Full control over Sentinel ARM resourceshttps://management.azure.com/Caller must construct ARM paths and handle async operations

For KQL queries, workspace lifecycle, custom tables, DCE/DCR provisioning, and log ingestion, use the loganalytics skill.

Patterns & Caveats

  • ARM async operations
  • Key ARM paths (alertRules, watchlists, incidents, automationRules, dataConnectors)

Examples

Incident retrieval

./skills/sentinel/Get-SentinelIncident.ps1 `
  -SubscriptionId $subscriptionId `
  -ResourceGroupName $resourceGroupName `
  -WorkspaceName $workspaceName `
  -Status "Active" `
  -AuthContext $authContext

Alert rule enumeration

./skills/sentinel/Get-SentinelAlertRule.ps1 `
  -SubscriptionId $subscriptionId `
  -ResourceGroupName $resourceGroupName `
  -WorkspaceName $workspaceName `
  -AuthContext $authContext

Prerequisites

  • Required modules
    • PowerShell 7.2+
    • MSAL.PS (only if you use certificate-based authentication and want MSAL token acquisition without Azure CLI fallback)
  • Required roles
    • Microsoft Sentinel Reader (for viewing incidents and analytic rules)
    • Microsoft Sentinel Contributor (required if you perform management-plane write operations via ARM, for example when expanding this skill set beyond read-only retrieval)

Related Docs

  • Auth Patterns
  • Token Chaining
  • Environment Endpoints

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.