forked from hesaad/AzureSentinelHub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAzure Sentinel Microsoft TEAMS CallRecords Activity Connector (Playbook)
172 lines (172 loc) · 7.35 KB
/
Azure Sentinel Microsoft TEAMS CallRecords Activity Connector (Playbook)
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"HTTP_-Get_TEAMS_Call_Records_by_SessionID": {
"inputs": {
"authentication": {
"audience": "https://graph.microsoft.com",
"clientId": "6e99aba1-a2d9-4b13-8dbc-e13d215d4b52",
"secret": "41-2~nuy1Llqv5fl5~ZJYF4~kW_GLPT1wb",
"tenant": "2006d214-5f91-4166-8d92-95f5e3ad9ec6",
"type": "ActiveDirectoryOAuth"
},
"method": "GET",
"uri": "https://graph.microsoft.com/beta/communications/callRecords/@{variables('TEAMSCallRecordsID')}?$expand=sessions($expand=segments)"
},
"runAfter": {
"HTTP_-_Get_All_TEAMS_CallRecords_Sessions": [
"Succeeded"
]
},
"type": "Http"
},
"HTTP_-_Create_CallRecords_Subscription": {
"inputs": {
"authentication": {
"audience": "https://graph.microsoft.com",
"clientId": "6e99aba1-a2d9-4b13-8dbc-e13d215d4b52",
"secret": "41-2~nuy1Llqv5fl5~ZJYF4~kW_GLPT1wb",
"tenant": "2006d214-5f91-4166-8d92-95f5e3ad9ec6",
"type": "ActiveDirectoryOAuth"
},
"body": {
"changeType": "updated",
"clientState": "secretClientValue",
"expirationDateTime": "2022-11-20T18:23:45.9356913Z",
"latestSupportedTlsVersion": "v1_2",
"notificationUrl": "https://outlook.office.com/webhook/3ec886e9-86ef-4c86-bfff-2d0321f3313e@2006d214-5f91-4166-8d92-95f5e3ad9ec6/IncomingWebhook/9c6e121ed50145199939f71721fcbcc7/03c99422-50b0-40ea-a00e-2b0b1b1892d5",
"resource": "/communications/callRecords"
},
"method": "POST",
"uri": "https://graph.microsoft.com/beta/subscriptions"
},
"runAfter": {
"HTTP_-_Get_HTTP_with_AzureAD_OAuth": [
"Succeeded"
]
},
"type": "Http"
},
"HTTP_-_Get_All_TEAMS_CallRecords_Sessions": {
"inputs": {
"authentication": {
"audience": "https://graph.microsoft.com",
"clientId": "6e99aba1-a2d9-4b13-8dbc-e13d215d4b52",
"secret": "41-2~nuy1Llqv5fl5~ZJYF4~kW_GLPT1wb",
"tenant": "2006d214-5f91-4166-8d92-95f5e3ad9ec6",
"type": "ActiveDirectoryOAuth"
},
"method": "GET",
"uri": "https://graph.microsoft.com/beta/communications/callRecords/@{variables('TEAMSCallRecordsID')}/sessions"
},
"runAfter": {
"HTTP_-_List_Subscriptions": [
"Succeeded"
]
},
"type": "Http"
},
"HTTP_-_Get_HTTP_with_AzureAD_OAuth": {
"inputs": {
"authentication": {
"audience": "https://graph.microsoft.com",
"clientId": "6e99aba1-a2d9-4b13-8dbc-e13d215d4b52",
"secret": "41-2~nuy1Llqv5fl5~ZJYF4~kW_GLPT1wb",
"tenant": "2006d214-5f91-4166-8d92-95f5e3ad9ec6",
"type": "ActiveDirectoryOAuth"
},
"method": "GET",
"uri": "https://graph.microsoft.com/v1.0/groups?$filter=groupTypes/any(c:c+eq+'Unified')"
},
"runAfter": {
"Initialize_variable_-_CallRecordID": [
"Succeeded"
]
},
"type": "Http"
},
"HTTP_-_List_Subscriptions": {
"inputs": {
"authentication": {
"audience": "https://graph.microsoft.com",
"clientId": "6e99aba1-a2d9-4b13-8dbc-e13d215d4b52",
"secret": "41-2~nuy1Llqv5fl5~ZJYF4~kW_GLPT1wb",
"tenant": "2006d214-5f91-4166-8d92-95f5e3ad9ec6",
"type": "ActiveDirectoryOAuth"
},
"method": "GET",
"uri": "https://graph.microsoft.com/v1.0/subscriptions"
},
"runAfter": {
"HTTP_-_Create_CallRecords_Subscription": [
"Succeeded"
]
},
"type": "Http"
},
"Initialize_variable_-_CallRecordID": {
"inputs": {
"variables": [
{
"name": "TEAMSCallRecordsID",
"type": "string",
"value": "fc340109-7190-4dbb-bf99-4d948bccae42"
}
]
},
"runAfter": {},
"type": "InitializeVariable"
},
"Send_TEAMS_CallRecords_Data_to_Azure_Sentinel_LA-Workspace": {
"inputs": {
"body": "@{body('HTTP_-Get_TEAMS_Call_Records_by_SessionID')}",
"headers": {
"Log-Type": "TEAMSGraphCallRecords"
},
"host": {
"connection": {
"name": "@parameters('$connections')['azureloganalyticsdatacollector']['connectionId']"
}
},
"method": "post",
"path": "/api/logs"
},
"runAfter": {
"HTTP_-Get_TEAMS_Call_Records_by_SessionID": [
"Succeeded"
]
},
"type": "ApiConnection"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"Recurrence": {
"recurrence": {
"frequency": "Minute",
"interval": 10
},
"type": "Recurrence"
}
}
},
"parameters": {
"$connections": {
"value": {
"azureloganalyticsdatacollector": {
"connectionId": "/subscriptions/6a021fde-5198-441e-9190-9d634e1f4a84/resourceGroups/hesaad-csgRG/providers/Microsoft.Web/connections/azureloganalyticsdatacollector",
"connectionName": "azureloganalyticsdatacollector",
"id": "/subscriptions/6a021fde-5198-441e-9190-9d634e1f4a84/providers/Microsoft.Web/locations/eastus/managedApis/azureloganalyticsdatacollector"
}
}
}
}
}