This article shows you how to configure Cydarm to automatically close Azure Sentinel incidents when their corresponding Cydarm cases are closed.
Overview
To automatically close Azure Sentinel incidents when corresponding cases are closed in Cydarm, modifications will need to be made to your existing Logic App and setting up a Sentinel Incident Closer connector.
Prerequisites
-
Completed setup from Creating Cydarm Cases from Azure Sentinel Incidents using Logic Apps
-
Azure service principal with permissions to modify Sentinel incidents
-
Cydarm instance with connector configuration access
Step 1: Modify your existing Logic App
You need to update the Create Cydarm Case step in your Logic App to include additional metadata fields required for incident closure.
Update the case creation body
In Step 5 (from Creating Cydarm Cases from Azure Sentinel Incidents using Logic Apps): Create Cydarm Case from the original guide, modify the body to include these additional metadata fields:
{
"description": "[Dynamic content: Trigger body → object → properties → title]",
"metadata": {
"MS Sentinel Incident ID": {
"value": "[Dynamic content: Trigger body → object → name]"
},
"Azure Tenant ID": {
"value": "your-tenant-id-here"
},
"Azure Subscription ID": {
"value": "[Dynamic content: Trigger body → workspaceInfo → subscriptionId]"
},
"Origin URL": {
"value": "[Dynamic content: Trigger body → object → properties → incidentUrl]"
}
}
}
Locating Dynamic Content Fields
For MS Sentinel incident ID:
-
Search for "ARM Name" in dynamic content
-
Select the field ARM Name of the Incident (GUID)
For Azure tenant ID:
-
This information is not available in the Sentinel incident trigger
-
Hard-code your Azure tenant ID directly in the JSON
For Azure subscription ID:
-
Search for "subscription" in dynamic content
-
Select Incident Workspace Subscription ID
-
Full path:
triggerBody()['workspaceInfo']['subscriptionId']
Step 2: Create Azure service principal
Set up service principal in Azure
-
Navigate to Azure Active Directory → App registrations
-
Click New registration
-
Provide a name (e.g., "Cydarm-Sentinel-Closer")
-
Register the application
-
Note the Application (client) ID and Directory (tenant) ID
Create client secret
-
In your app registration, go to Certificates & secrets
-
Click New client secret
-
Set expiration period and description
-
Copy the secret Value (not the ID)
Assign permissions to service principal
-
SecurityAlert.ReadWrite.All
-
SecurityEvents.Read.All
-
SecurityAlert.Read.All
-
SecurityEvents.ReadWrite.All
-
SecurityIncident.Read.All
-
SecurityIncident.ReadWrite.All
-
User.Read
Step 3: Configure Cydarm Sentinel incident closer connector
Create the connector
-
In Cydarm, navigate to Admin → Connectors
-
Click Add Connector
-
Configure the following settings:
Basic configuration:
-
Connector Type: Microsoft Sentinel Incidents
-
Name: Sentinel Incident Closer
-
Description: Automatically closes Azure Sentinel incidents when Cydarm cases are closed
Authentication settings:
-
Client ID: Application (client) ID from your service principal
-
Client Secret: Client secret value from Azure
-
Tenant ID: Your Azure tenant ID
Alternative authentication (certificate-based)
If you prefer certificate authentication over client secrets:
-
Generate a certificate and upload the public key to your Azure service principal
-
In the Cydarm connector, check the box for “Use Certificate Authentication” and paste in:
-
Public Key: Certificate public key
-
Private Key: Certificate private key
-
Azure configuration:
-
Subscription ID: Your Azure subscription ID
-
Workspace Name: Name of your Sentinel workspace
-
Resource Group Name: Resource group containing your Sentinel workspace
Connector options:
-
✅ Close Cases: Must be enabled for incident closure
-
❌ Activate Polling: Do NOT enable (we're using Logic Apps for case creation)
-
Organization: Select appropriate organization if using multi-tenant Cydarm
Step 4: Test the integration
Create and process a test incident
-
In Azure Sentinel, create a new incident manually
-
Run your Logic App playbook on the incident:
-
Open the incident
-
Click Actions → Run playbook
-
Select your Logic App
-
Verify case creation
-
Check Cydarm case list for the new case
-
Verify the case contains all required metadata:
-
Microsoft Sentinel incident ID
-
Azure tenant ID
-
Azure subscription ID
-
Origin URL
-
-
Confirm case status shows as New
Test incident closure
-
In Cydarm, open the case
-
Change status to Analysis then Closure
-
Return to Azure Sentinel and refresh the incidents list
-
Verify the incident status changed to Closed
-
Refresh again - closed incidents disappear from the default view
Troubleshooting
Incident doesn't close automatically:
-
Verify service principal has required roles
-
Check that Close Cases is enabled in the connector
-
Ensure all metadata fields are correctly populated in the case
Authentication errors:
-
Verify client ID and tenant ID are correct
-
Check that client secret hasn't expired
-
Ensure service principal has proper permissions on the Sentinel workspace
Missing metadata fields:
-
Check that the required metadata field names exist in Cydarm settings
-
Review the Logic App run history to confirm all fields are being populated
-
Check dynamic content mappings are pointing to correct trigger body properties
Unexpected case creation or no case creation:
-
Ensure Activate Polling is disabled in the connector
-
Verify the original Logic App is working correctly per the first guide
Important Notes
-
Do not enable polling: The connector should only close cases, not create them
-
Metadata is required: All four metadata fields (incident ID, tenant ID, subscription ID, origin URL) must be present for closure to work
-
Status synchronization: Case status changes in Cydarm will automatically reflect in Sentinel
-
Bidirectional sync: This creates a complete bidirectional integration between Cydarm and Azure Sentinel
The integration now provides complete lifecycle management, allowing you to create cases from Sentinel incidents and automatically close the original incidents when case investigation is complete in Cydarm.
{
"description": "[Dynamic content: Trigger body → object → properties → title]",
"metadata": {
"MS Sentinel Incident ID": {
"value": "[Dynamic content: Trigger body → object → name]"
},
"Azure Tenant ID": {
"value": "your-tenant-id-here"
},
"Azure Subscription ID": {
"value": "[Dynamic content: Trigger body → workspaceInfo → subscriptionId]"
},
"Origin URL": {
"value": "[Dynamic content: Trigger body → object → properties → incidentUrl]"
}
}
}
For more detailed technical information please refer to our Cydarm API documentation.