|
| 1 | +--- |
| 2 | +title: Use SOC optimizations programmatically |
| 3 | +description: Learn how to use Microsoft Sentinel SOC optimization recommendations programmatically. |
| 4 | +ms.pagetype: security |
| 5 | +ms.author: bagol |
| 6 | +author: batamig |
| 7 | +manager: raynew |
| 8 | +ms.collection: |
| 9 | + - usx-security |
| 10 | +ms.topic: concept-article |
| 11 | +ms.date: 06/09/2024 |
| 12 | +appliesto: |
| 13 | + - Microsoft Sentinel in the Microsoft Defender portal |
| 14 | + - Microsoft Sentinel in the Azure portal |
| 15 | +#customerIntent: As a SOC engineer, I want to learn about about how to interact with SOC optimziation recommendations programmatically via API. |
| 16 | +--- |
| 17 | + |
| 18 | +# Using SOC optimizations programmatically (Preview) |
| 19 | + |
| 20 | +Use the Microsoft Sentinel `recommendations` API to programmatically interact with SOC optimization recommendations, helping you to close coverage gaps against specific threats and tighten ingestion rates. You can get details about all current recommendations across your workspaces or a specific SOC optimization recommendation, or you can reevaluate a recommendation if you've made changes in your environment. |
| 21 | + |
| 22 | +For example, use the `recommendations` API to: |
| 23 | + |
| 24 | +- Build custom reports and dashboards. For example, see [Visualize custom SOC optimization data](#visualize-custom-soc-optimization-data). |
| 25 | +- Integrate with third-party tools, such as for SOAR and ITSM services |
| 26 | +- Get automated, real-time access to SOC optimization data, triggering evaluations and responding promptly to the suggestions |
| 27 | + |
| 28 | +For customers or MSSPs managing multiple environments, the `recommendations` API provides a scalable way to handle recommendations across multiple workspaces. You can also export data from the API and store it externally for audit, archiving, or tracking trends. |
| 29 | + |
| 30 | +> [!IMPORTANT] |
| 31 | +> [!INCLUDE [unified-soc-preview-without-alert](../includes/unified-soc-preview-without-alert.md)] |
| 32 | +> |
| 33 | +> The `recommendations` API is in **PREVIEW**. See the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for additional legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability. |
| 34 | +
|
| 35 | +## Get, update, or reevaluate recommendations |
| 36 | + |
| 37 | +Use the following examples of the `recommendations` API to interact with SOC optimization recommendations programmatically: |
| 38 | + |
| 39 | +- **Get a list of all current SOC optimization recommendations in your workspace**: |
| 40 | + |
| 41 | + ```rest |
| 42 | + GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/recommendations |
| 43 | + ``` |
| 44 | +
|
| 45 | +- **Get a specific recommendation by recommendation ID**: |
| 46 | +
|
| 47 | + ```rest |
| 48 | + GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/recommendations/{recommendationId} |
| 49 | + ``` |
| 50 | +
|
| 51 | + Find a recommendation's ID value by first getting a list of all recommendations in your workspace. |
| 52 | +
|
| 53 | +- **Update a recommendation's status to *Active*, *In Progress*, *Completed*, *Dismissed*, or *Reactivate***: |
| 54 | +
|
| 55 | + ```rest |
| 56 | + PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/recommendations/{recommendationId} |
| 57 | + ``` |
| 58 | +
|
| 59 | +- **Manually trigger an evaluation for a specific recommendation**: |
| 60 | +
|
| 61 | + ```rest |
| 62 | + POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/recommendations/{recommendationId} /triggerEvaluation |
| 63 | + ``` |
| 64 | +
|
| 65 | +## Visualize custom SOC optimization data |
| 66 | +
|
| 67 | +The **Microsoft Sentinel Optimization Workbook** uses the `recommendations` API to visualize SOC optimization data. Install and customize the workbook in your workspace to create your own custom SOC optimization dashboard. |
| 68 | +
|
| 69 | +In the **Microsoft Sentinel Optimization Workbooks**, select the **SOC Optimization** tab and expand the items under **Details** to drill down into to view SOC optimization data. Edit the workbook to modify the data shown as needed for your organization. |
| 70 | +
|
| 71 | +For example: |
| 72 | +
|
| 73 | +:::image type="content" source="media/soc-optimization-api/soc-optimization-workbook.png" alt-text="Screenshot of the Microsoft Sentinel Optimization Workbook." lightbox="media/soc-optimization-api/soc-optimization-workbook.png"::: |
| 74 | +
|
| 75 | +For more information, see: |
| 76 | +
|
| 77 | +- [Discover and manage Microsoft Sentinel out-of-the-box content](../sentinel-solutions-deploy.md) |
| 78 | +- [Visualize and monitor your data by using workbooks in Microsoft Sentinel](../monitor-your-data.md). |
| 79 | +
|
| 80 | +## Related content |
| 81 | +
|
| 82 | +For more information, see: |
| 83 | +
|
| 84 | +- [Optimize your security operations](soc-optimization-access.md) |
| 85 | +- [SOC optimization reference of recommendations](soc-optimization-reference.md) |
| 86 | +- Blogs: [Introducing the SOC Optimization API](https://aka.ms/SocOptimizationAPI) | [Unlock the power of precision-driven security management](https://aka.ms/SOC_Optimization) |
0 commit comments