Add files via upload
This commit is contained in:
Родитель
50a1e13604
Коммит
aab2847310
|
@ -0,0 +1,152 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"metadata": {
|
||||
"title": "Notify Incident Owner in Microsoft Teams",
|
||||
"description": "This playbook sends a Teams message to the new incident owner.",
|
||||
"prerequisites": ["Microsoft Teams account that allows to send messages"],
|
||||
"postdeploymentsteps": ["1. Authorize Microsoft Teams connector in Logic Apps designer", "2. Attach this playbook to an automation rule with trigger: When an incident is updated, condition: Owner Changed."],
|
||||
"lastUpdateTime": "2022-05-30T00:00:00.000Z",
|
||||
"entities": [],
|
||||
"tags": ["Notification", "Update Trigger"],
|
||||
"support": {
|
||||
"tier": "community"
|
||||
},
|
||||
"author": {
|
||||
"name": "Lior Tamir"
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"PlaybookName": {
|
||||
"defaultValue": "updatetrigger-notifyOwner",
|
||||
"type": "String",
|
||||
"metadata": {
|
||||
"description": "Name of the Logic Apps resource to be created"
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"MicrosoftSentinelConnectionName": "[concat('MicrosoftSentinel-', parameters('PlaybookName'))]",
|
||||
"TeamsConnectionName": "[concat('teams-', parameters('PlaybookName'))]"
|
||||
},
|
||||
"resources": [
|
||||
|
||||
{
|
||||
"type": "Microsoft.Web/connections",
|
||||
"apiVersion": "2016-06-01",
|
||||
"name": "[variables('MicrosoftSentinelConnectionName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"kind": "V1",
|
||||
"properties": {
|
||||
"displayName": "[variables('MicrosoftSentinelConnectionName')]",
|
||||
"customParameterValues": {
|
||||
},
|
||||
"parameterValueType": "Alternative",
|
||||
"api": {
|
||||
"id": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/Azuresentinel')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Web/connections",
|
||||
"apiVersion": "2016-06-01",
|
||||
"name": "[variables('TeamsConnectionName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"displayName": "[variables('TeamsConnectionName')]",
|
||||
"customParameterValues": {
|
||||
},
|
||||
"api": {
|
||||
"id": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/teams')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Logic/workflows",
|
||||
"apiVersion": "2017-07-01",
|
||||
"name": "[parameters('PlaybookName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"tags": {
|
||||
"hidden-SentinelTemplateName": "notifyOwnerTeams",
|
||||
"hidden-SentinelTemplateVersion": "1.0"
|
||||
},
|
||||
"identity": {
|
||||
"type": "SystemAssigned"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.Web/connections', variables('MicrosoftSentinelConnectionName'))]",
|
||||
"[resourceId('Microsoft.Web/connections', variables('TeamsConnectionName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"state": "Enabled",
|
||||
"definition": {
|
||||
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"$connections": {
|
||||
"defaultValue": {},
|
||||
"type": "Object"
|
||||
}
|
||||
},
|
||||
"triggers": {
|
||||
"Microsoft_Sentinel_incident": {
|
||||
"type": "ApiConnectionWebhook",
|
||||
"inputs": {
|
||||
"body": {
|
||||
"callback_url": "@{listCallbackUrl()}"
|
||||
},
|
||||
"host": {
|
||||
"connection": {
|
||||
"name": "@parameters('$connections')['microsoftsentinel']['connectionId']"
|
||||
}
|
||||
},
|
||||
"path": "/incident-creation"
|
||||
}
|
||||
}
|
||||
},
|
||||
"actions": {
|
||||
"Post_message_in_a_chat_or_channel": {
|
||||
"runAfter": {},
|
||||
"type": "ApiConnection",
|
||||
"inputs": {
|
||||
"body": {
|
||||
"messageBody": "<p><span style=\"font-size: 16px\"><strong>You have been assigned to a Microsoft Sentinel Incident </strong></span><span style=\"font-size: 16px\"><strong>@{triggerBody()?['object']?['properties']?['incidentNumber']}</strong></span><span style=\"font-size: 16px\"><strong>: </strong></span><span style=\"font-size: 16px\"><strong>@{triggerBody()?['object']?['properties']?['title']}</strong></span><span style=\"font-size: 16px\"><strong><br>\n</strong></span><br>\nClick here to view incident:<br>\n@{triggerBody()?['object']?['properties']?['incidentUrl']}<br>\n</p>",
|
||||
"recipient": "@triggerBody()?['object']?['properties']?['owner']?['email']"
|
||||
},
|
||||
"host": {
|
||||
"connection": {
|
||||
"name": "@parameters('$connections')['teams']['connectionId']"
|
||||
}
|
||||
},
|
||||
"method": "post",
|
||||
"path": "/beta/teams/conversation/message/poster/Flow bot/location/@{encodeURIComponent('Chat with Flow bot')}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"outputs": {}
|
||||
},
|
||||
"parameters": {
|
||||
"$connections": {
|
||||
"value": {
|
||||
"microsoftsentinel": {
|
||||
"connectionId": "[resourceId('Microsoft.Web/connections', variables('MicrosoftSentinelConnectionName'))]",
|
||||
"connectionName": "[variables('MicrosoftSentinelConnectionName')]",
|
||||
"id": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/Azuresentinel')]",
|
||||
"connectionProperties": {
|
||||
"authentication": {
|
||||
"type": "ManagedServiceIdentity"
|
||||
}
|
||||
}
|
||||
},
|
||||
"teams": {
|
||||
"connectionId": "[resourceId('Microsoft.Web/connections', variables('TeamsConnectionName'))]",
|
||||
"connectionName": "[variables('TeamsConnectionName')]",
|
||||
"id": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/teams')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 40 KiB |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 41 KiB |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 25 KiB |
|
@ -0,0 +1,27 @@
|
|||
# Notify Incident Owner in Microsoft Teams
|
||||
author: Lior Tamir
|
||||
|
||||
This playbook sends a Teams message to the new incident owner.
|
||||
|
||||
# Prerequisites
|
||||
|
||||
Microsoft Teams account that allows to send messages.
|
||||
|
||||
# Quick Deployment
|
||||
[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2FAzure-Sentinel%2Fmaster%2FPlaybooks%2FNotify-Owner%2Fazuredeploy.json)
|
||||
[![Deploy to Azure Gov](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/deploytoazuregov.png)](https://portal.azure.us/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2FAzure-Sentinel%2Fmaster%2FPlaybooks%2FNotify-Owner%2Fazuredeploy.json)
|
||||
<br><br>
|
||||
|
||||
# Post-deployment
|
||||
Add playbook as an action to the automation rule
|
||||
- Trigger = When incident is updated;
|
||||
- Condition = Owner changed.<br>
|
||||
|
||||
|
||||
# Screenshots
|
||||
|
||||
**Playbook** <br>
|
||||
![playbook screenshot](./images/designerLight.png)<br>
|
||||
|
||||
**Teams message** <br>
|
||||
![teams notification](./images/ownerTeamsMessage.png)<br><br>
|
Загрузка…
Ссылка в новой задаче