Working across the security ecosystem

At Elastic, we have always had one mission: to bring the best search and analytics capabilities to wherever our users are. This principle is built into all three of Elastic’s solutions, including Elastic Security. The AI-driven security analytics solution is built to be open, transparent, and available to users of all kinds. 

Microsoft Sentinel is a widely adopted security information and event management (SIEM) solution, including with Elastic users. As an Azure based SaaS product, it integrates seamlessly into other Microsoft products and beyond.

Elastic has complementary strengths that can bring a lot of value to security teams that use Microsoft Sentinel. Let’s dive into a few of the main ones.

https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt07c2c19f4d966067/6815446d478db20482757840/Logical_-case-webhook-architecture.png,Logical -case-webhook-architecture.png

Part 1: Create Azure Logic Apps 

Although it’s not complicated to build the Logic Apps, we will provide an Azure Resource Manager (ARM) template that can speed up the process.

1. Download the template here, which includes:

2. Search in the Azure console for “Deploy a custom template.”

3. Click
Build your own template in the editor. Upload the template file you downloaded.

https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt0711a29774e6c99d/681544b4ae96e7a827d383d8/Uploading-the-template.png,Uploading-the-template.png

4. Click Save.

5. Fill out the details for the template:

https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt216237d3fda75f3c/681544efdf716cd1e3bf9989/Configuring-template-variables.png,Configuring-template-variables.png

6. Click Review and create.

7. Click Create.

8. After your deployment is complete, navigate to the new API Connection by clicking Deployment details and then clicking on the created API Connection.

9. Within the API Connection, authorize Microsoft Sentinel. Navigate to General→Edit API connection and click Authorize. After you authorize, click Save.

10. Now that you have authorized the API connection, the logic apps can interact with Sentinel. Open both workflows in new tabs so they are available for the next part.

Part 2: Configure case management connector in Kibana

1. In Kibana, head to Stack ManagementConnectors and click Create Connector. 

2. Select Webhook - Case Management and give your connector a name, and then select Authentication = None as the authentication will be embedded in the url. Add HTTP header switch on and enter Content-Type as a key and application/json as its value.

3. On the next screen, enter the endpoint details for case creation. Copy the URL of the corresponding Logic App and paste it into the
Create case URL box (e.g., example-elastic-create-incident). You will find this inside the Request action’s details page. Navigate to Development Tools → Logic Apps designer to see the workflow.

https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt48fea85d563a30ec/68154522bef85944e51a7e27/Capturing-Logic-App-webhook-URL.png,Capturing-Logic-App-webhook-URL.png

In the Create case object box, build a JSON object using the variables that Kibana makes available. The keys here must match up with the JSON schema that the Logic App’s request connector is expecting, so that the values can be correctly extracted and used where needed.

{ "action": "create-incident", "case_id": {{{case.id}}}, "case_title": {{{case.title}}}, "case_severity": {{{case.severity}}}, "case_status": {{{case.status}}}, "case_description": {{{case.description}}}, "case_tags": {{{case.tags}}}, "elastic_url_base": "/app/security/cases/" }

Finally, set the Create case response external key. This tells Kibana how to extract the Microsoft Sentinel incident ID from the response returned by your Logic app.

Create case response external key:

sentinel_incident_id

4. On the next screen, configure the connector needed to get case information from Microsoft Sentinel. Here, use a new variable called external.system.id, which has been populated by the Microsoft Sentinel incident ID extracted during the previous step. Go to the Logic App created earlier that gets the incident information (e.g., example-elastic-get-incident) and retrieve the URL. Use the URL and add the external.system.id as a query parameter.Get case URL:

&sentinel_incident_id={{{external.system.id}}}

Also configure the following.
Get case response external title key:

title

External case view URL:

https://portal.azure.com/#asset/Microsoft_Azure_Security_Insights/Incident/subscriptions//resourceGroups//providers/Microsoft.OperationalInsights/workspaces//providers/Microsoft.SecurityInsights/Incidents/{{{external.system.id}}}

5. On the final screen of the connector wizard, we configure the final two endpoints for creating case updates and adding comments. Use the URL from the create case workflow and set the following parameters:
Update case method: POST
Update case object:

{ "action": "update-incident", "case_id": {{{case.id}}}, "case_title": {{{case.title}}}, "case_severity": {{{case.severity}}}, "case_status": {{{case.status}}}, "case_description": {{{case.description}}}, "case_tags": {{{case.tags}}}, "sentinel_incident_id": {{{external.system.id}}} }

Create comment method: POST

Create comment object:

{ "action": "add-comment-to-incident", "case_comment": {{{case.comment}}}, "sentinel_incident_id": {{{external.system.id}}} }

6. Kibana provides an option to test the connector by filling in dummy values. Make sure to use this and ensure everything works before rolling out for real!

Part 3: Activate the case management connector

  1. In Kibana, head to SecurityCases and click Settings. 

  2. Find the External incident management system section and select your new connector from the drop-down box. You can choose to edit the connector settings from here also if necessary. 

  3. Now, whenever you go to create a case in Kibana, the External Connector Fields section will be completed and your connector will be selected by default. 

  4. Try creating a case, updating its status, and adding comments! Then head over to Microsoft Sentinel to see all the same information already synchronized.

https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/bltf09a332bd444125f/68154626b25939336cbcf4db/Logical-alert-webhook-architecture.png,Logical-alert-webhook-architecture.png

Part 1: Create Azure Logic Apps

To replicate this architecture, we have provided an example ARM template that creates a Logic App and related Log Analytics collector to connect the two.

To deploy the template:

  1. Download our example workflow template here

  2. In Azure, search for “Deploy a custom template.”

  3. Select Build your own template in the editor.

  4. Select Load file.

  5. Choose the downloaded template.

  6. Click Save.

  7. Choose your resource group and name.

  8. Choose your name for the workflow, the :ph Analytics Collector, and the details of your Log Analytics workspace.

  9. To find your workspace ID and key, navigate to the workspace and select “Agents” and choose instructions.

  10. After review and create, navigate to Logic Apps to check the created workflow


Part 2: Configure the Elastic Alert Connector

Now that we have the Logic App workflow, we need to configure Elastic to send alerts to Logic Apps. To do that we can follow the documentation.

  1. In Kibana, navigate to Stack Management.

  2. In Connectors, create a new Webhook connector. 

  3. In Logic Apps, open your workflow, open the “Logic Apps Designer” view, click the request trigger, and copy the “HTTP URL”

  4. Fill out the Webhook connector configuration:

  5. Click Save and Test.

  6. In the Test box, use a basic test body such as: {"alert":{"id": "Test"}}

  7. You should see “Test was successful.” 

  8. You can also see the test event in the Logic App by clicking on Overview and scrolling down to the Runs History table. 

You now have a working route between Elastic and your chosen Log Analytics workspace.

Part 3: Create an Elastic SIEM detection rule to test the connector

1. In Kibana, navigate to SecurityRules → Detection Rules (SIEM).

2. Click Create new rule.

3. In the first section, “Define Rule,” use the following configuration:

4. In the second section, “About rule,” complete the following:

5. In the third section, “Schedule rule,” you can leave everything as default. 

6. In the final section, “Rule actions,” link the rule to the connector we defined in the previous section.

Part 4: Create a Microsoft Sentinel analytics rule to pick up the alert

The final piece of the puzzle is to define a query rule in Microsoft Sentinel that takes some action when Elastic alerts appear as logs in the Log Analytics stream.

1. In Microsoft Sentinel, navigate to ConfigurationAnalytics.

2. Click Create and then NRT Query Rule.

3. In the General section, complete the following:

4. In the Set rule logic section, complete the following:

Optional: In the Alert enhancement section, you have the possibility to enrich the generated Microsoft Sentinel alerts in a number of ways. If the alert data from Elastic Security contains identifiers that relate to entities recognized by Microsoft Sentinel, the Entity mapping option allows these links to be made. Parameters from the Elastic Security alert can be added as key-value pairs in the Custom details option or formatted as the name or description of the alert in the Alert details option.

5. In the Incident settings section, complete the following:

6. Skip the Automated response section and click Next.

7. Review all entered details and if all looks good, click Save to add the new rule to Sentinel. This is enabled automatically. 

And we’re done! So, from this point onward, any time our detection rule fires in Elastic Security and creates an alert, we will see corresponding alerts and incidents in Sentinel.

If you would like to test the integration, simply send a log in to Elastic Security to trigger the rule. One way to do this is by using Kibana’s Console (inside Management menu → Dev Tools). 

Enter the following into the
Shell panel and hit the play button to send the request:

POST logs-delete-me/_doc { "timestamp": "2025-03-03T10:11:11Z", "message": "malware has been installed. panic!" }Scenario 3: Ingesting Microsoft Sentinel logs into Elastic Security

Even if your main goal is to provide additional information into your Microsoft Sentinel instance, it is also worth thinking about replicating logs relating to alerts, incidents, and events from Microsoft Sentinel into Elastic Security. If your use case for Elastic involves threat hunting through diverse data or carrying out historic analysis, it is incredibly valuable to have the context from Microsoft Sentinel as part of your investigation in Elastic.

ElasticSecurity  provides an out-of-the-box integration for Sentinel that collects and parses alerts and incidents from Microsoft Sentinel REST API and events from the Azure Event Hub.

For more information, see
the documentation.