-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathLA-DisableServicePrincipal.json
120 lines (120 loc) · 5.3 KB
/
LA-DisableServicePrincipal.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Process_Alerts": {
"actions": {
"Disable_Service_Principal_(PATCH)": {
"inputs": {
"authentication": {
"audience": "https://graph.microsoft.com",
"identity": "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/UAMI-SentinelAutomation",
"type": "ManagedServiceIdentity"
},
"body": {
"accountEnabled": "false"
},
"headers": {
"Content-Type": "application/json"
},
"method": "PATCH",
"uri": "https://graph.microsoft.com/v1.0/servicePrincipals/@{body('Parse_Alert_Custom_Details')?['ObjectId'][0]}"
},
"runAfter": {
"Parse_Alert_Custom_Details": [
"Succeeded"
]
},
"type": "Http"
},
"Parse_Alert_Custom_Details": {
"inputs": {
"content": "@items('Process_Alerts')?['properties']?['additionalData']?['Custom Details']",
"schema": {
"properties": {
"CredentialKeyId": {
"items": {
"type": "string"
},
"type": "array"
},
"CredentialThumbprint": {
"items": {
"type": "string"
},
"type": "array"
},
"ObjectId": {
"items": {
"type": "string"
},
"type": "array"
},
"RequestUri": {
"items": {
"type": "string"
},
"type": "array"
},
"ServicePrincipalName": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
}
},
"runAfter": {},
"type": "ParseJson"
}
},
"foreach": "@triggerBody()?['object']?['properties']?['Alerts']",
"runAfter": {},
"type": "Foreach"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"Microsoft_Sentinel_incident": {
"inputs": {
"body": {
"callback_url": "@{listCallbackUrl()}"
},
"host": {
"connection": {
"name": "@parameters('$connections')['azuresentinel_1']['connectionId']"
}
},
"path": "/incident-creation"
},
"type": "ApiConnectionWebhook"
}
}
},
"parameters": {
"$connections": {
"value": {
"azuresentinel_1": {
"connectionId": "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Web/connections/azuresentinel",
"connectionName": "azuresentinel",
"connectionProperties": {
"authentication": {
"identity": "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/UAMI-SentinelAutomation",
"type": "ManagedServiceIdentity"
}
},
"id": "/subscriptions/{SubscriptionId}/providers/Microsoft.Web/locations/westeurope/managedApis/azuresentinel"
}
}
}
}
}