|
| 1 | +--- |
| 2 | +title: "Get alert" |
| 3 | +description: "Read the properties and relationships of an alert object." |
| 4 | +author: "huatang92" |
| 5 | +ms.localizationpriority: medium |
| 6 | +ms.subservice: "entra-monitoring-health" |
| 7 | +doc_type: apiPageType |
| 8 | +--- |
| 9 | + |
| 10 | +# Get alert |
| 11 | + |
| 12 | +Namespace: microsoft.graph.healthMonitoring |
| 13 | + |
| 14 | +[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)] |
| 15 | + |
| 16 | +Read the properties and relationships of a Microsoft Entra health monitoring [alert](../resources/healthmonitoring-alert.md) object. The returned alert object contains information about the state, type, date, and impact of each alert that fired within your tenant. |
| 17 | + |
| 18 | +## Permissions |
| 19 | + |
| 20 | +Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions [only if your app requires it](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference). |
| 21 | + |
| 22 | +<!-- { |
| 23 | + "blockType": "permissions", |
| 24 | + "name": "healthmonitoring-alert-get-permissions" |
| 25 | +} |
| 26 | +--> |
| 27 | +[!INCLUDE [permissions-table](../includes/permissions/healthmonitoring-alert-get-permissions.md)] |
| 28 | + |
| 29 | +[!INCLUDE [rbac-healthmonitoring-alert-apis-read](../includes/rbac-for-apis/rbac-healthmonitoring-alert-apis-read.md)] |
| 30 | + |
| 31 | +## HTTP request |
| 32 | + |
| 33 | +<!-- { |
| 34 | + "blockType": "ignored" |
| 35 | +} |
| 36 | +--> |
| 37 | +``` http |
| 38 | +GET /reports/healthMonitoring/alerts/{alertId} |
| 39 | +``` |
| 40 | + |
| 41 | +## Optional query parameters |
| 42 | + |
| 43 | +This method supports the `$select` and `$expand` [OData query parameters](/graph/query-parameters) to help customize the response. |
| 44 | + |
| 45 | +When no `$expand` query parameter is added, this API doesn't return `resourceSampling` property by default. When you want to retrieve a sample of the resources involved in triggering the alert for root cause investigation, you can add `$expand=enrichment/impacts/microsoft.graph.healthmonitoring.directoryobjectimpactsummary/resourceSampling` to view `resourceSampling` in [directoryObjectImpactSummary](../resources//healthmonitoring-directoryobjectimpactsummary.md). |
| 46 | + |
| 47 | +## Request headers |
| 48 | + |
| 49 | +|Name|Description| |
| 50 | +|:---|:---| |
| 51 | +|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).| |
| 52 | + |
| 53 | +## Request body |
| 54 | + |
| 55 | +Don't supply a request body for this method. |
| 56 | + |
| 57 | +## Response |
| 58 | + |
| 59 | +If successful, this method returns a `200 OK` response code and a [microsoft.graph.healthMonitoring.alert](../resources/healthmonitoring-alert.md) object in the response body. |
| 60 | + |
| 61 | +## Examples |
| 62 | + |
| 63 | +### Example 1: Get the properties of the specified alert |
| 64 | + |
| 65 | +#### Request |
| 66 | + |
| 67 | +The following example shows a request. |
| 68 | +<!-- { |
| 69 | + "blockType": "request", |
| 70 | + "name": "get_alert1" |
| 71 | +} |
| 72 | +--> |
| 73 | +``` http |
| 74 | +GET https://graph.microsoft.com/beta/reports/healthMonitoring/alerts/{id} |
| 75 | +``` |
| 76 | + |
| 77 | +#### Response |
| 78 | + |
| 79 | +The following example shows the response. |
| 80 | +>**Note:** The response object shown here might be shortened for readability. |
| 81 | +<!-- { |
| 82 | + "blockType": "response", |
| 83 | + "truncated": true, |
| 84 | + "@odata.type": "microsoft.graph.healthMonitoring.alert" |
| 85 | +} |
| 86 | +--> |
| 87 | +``` http |
| 88 | +HTTP/1.1 200 OK |
| 89 | +Content-Type: application/json |
| 90 | +
|
| 91 | +{ |
| 92 | + "@odata.context": "https://graph.microsoft.com/beta/$metadata#reports/healthMonitoring/alerts/$entity", |
| 93 | + "id": "0c56dfcb-13db-4128-bda2-fc3e42742467", |
| 94 | + "alertType": "mfaSignInFailure", |
| 95 | + "scenario": "mfa", |
| 96 | + "category": "authentication", |
| 97 | + "createdDateTime": "2024-06-19T11:23:44.1234567Z", |
| 98 | + "state": "active", |
| 99 | + "enrichment": { |
| 100 | + "state": "enriched", |
| 101 | + "impacts": [ |
| 102 | + { |
| 103 | + "@odata.type": "#microsoft.graph.healthMonitoring.userImpactSummary", |
| 104 | + "resourceType": "user", |
| 105 | + "impactedCount": 143, |
| 106 | + "impactedCountLimitExceeded": false |
| 107 | + }, |
| 108 | + { |
| 109 | + "@odata.type": "#microsoft.graph.healthMonitoring.applicationImpactSummary", |
| 110 | + "resourceType": "application", |
| 111 | + "impactedCount": 1, |
| 112 | + "impactedCountLimitExceeded": true |
| 113 | + } |
| 114 | + ], |
| 115 | + "supportingData": { |
| 116 | + "signIns": "https://graph.microsoft.com/beta/auditLogs/signIns?$filter=((status/errorCode eq 500121) and createdDateTime gt 2024-06-08T11:23:44.1234567Z and createdDateTime le 2024-06-19T11:23:44.1234567Z and (signInEventTypes/any(t:t eq 'interactiveUser' or t eq 'noninteractiveUser')))", |
| 117 | + "audits": "https://graph.microsoft.com/beta/auditLogs/directoryaudits?$filter=(activityDateTime ge 2024-06-08T11:23:44.1234567Z and activityDateTime le 2024-06-19T11:23:44.1234567Z)&$top=50&$orderby=activityDateTime desc" |
| 118 | + } |
| 119 | + }, |
| 120 | + "signals": { |
| 121 | + "mfaSignInFailure": "https://graph.microsoft.com/beta/reports/serviceActivity/getMetricsForMfaSignInFailure(inclusiveIntervalStartDateTime=2024-06-08T11:23:44.1234567Z, exclusiveIntervalEndDateTime=2024-06-19T11:23:44.1234567Z, aggregationIntervalInMinutes=5)" |
| 122 | + }, |
| 123 | + "documentation": { |
| 124 | + "mfaAlertTroubleshootingGuide": "https://learn.microsoft.com/en-us/entra/identity/authentication/" |
| 125 | + } |
| 126 | +} |
| 127 | +``` |
| 128 | + |
| 129 | +### Example 2: Use $select to retrieve specific properties of an alert |
| 130 | + |
| 131 | +#### Request |
| 132 | + |
| 133 | +The following example shows a request. |
| 134 | +<!-- { |
| 135 | + "blockType": "request", |
| 136 | + "name": "get_alert2" |
| 137 | +} |
| 138 | +--> |
| 139 | +``` http |
| 140 | +GET https://graph.microsoft.com/beta/reports/healthMonitoring/alerts/{id}?$select=alertType, state, createdDateTime, signals |
| 141 | +``` |
| 142 | + |
| 143 | +#### Response |
| 144 | + |
| 145 | +The following example shows the response. |
| 146 | +>**Note:** The response object shown here might be shortened for readability. |
| 147 | +<!-- { |
| 148 | + "blockType": "response", |
| 149 | + "truncated": true, |
| 150 | + "@odata.type": "microsoft.graph.healthMonitoring.alert" |
| 151 | +} |
| 152 | +--> |
| 153 | +``` http |
| 154 | +HTTP/1.1 200 OK |
| 155 | +Content-Type: application/json |
| 156 | +
|
| 157 | +{ |
| 158 | + "@odata.context": "https://graph.microsoft.com/beta/$metadata#reports/healthMonitoring/alerts(alertType,state,createdDateTime,signals)/$entity", |
| 159 | + "alertType": "mfaSignInFailure", |
| 160 | + "createdDateTime": "2024-06-19T11:23:44.1234567Z", |
| 161 | + "state": "active", |
| 162 | + "signals": { |
| 163 | + "mfaSignInFailure": "https://graph.microsoft.com/beta/reports/serviceActivity/getMetricsForMfaSignInFailure(inclusiveIntervalStartDateTime=2024-06-08T11:23:44.1234567Z, exclusiveIntervalEndDateTime=2024-06-19T11:23:44.1234567Z, aggregationIntervalInMinutes=5)" |
| 164 | + } |
| 165 | +} |
| 166 | +``` |
| 167 | + |
| 168 | +### Example 3: Use $expand to show resource sampling of an alert |
| 169 | + |
| 170 | +#### Request |
| 171 | + |
| 172 | +The following example shows a request. |
| 173 | +<!-- { |
| 174 | + "blockType": "request", |
| 175 | + "name": "get_alert3" |
| 176 | +} |
| 177 | +--> |
| 178 | +``` http |
| 179 | +GET https://graph.microsoft.com/beta/reports/healthMonitoring/alerts/{id}?$expand=enrichment/impacts/microsoft.graph.healthmonitoring.directoryobjectimpactsummary/resourceSampling&$select=alertType, createdDateTime, enrichment' |
| 180 | +``` |
| 181 | + |
| 182 | +#### Response |
| 183 | + |
| 184 | +The following example shows the response. |
| 185 | +>**Note:** The response object shown here might be shortened for readability. |
| 186 | +<!-- { |
| 187 | + "blockType": "response", |
| 188 | + "truncated": true, |
| 189 | + "@odata.type": "microsoft.graph.healthMonitoring.alert" |
| 190 | +} |
| 191 | +--> |
| 192 | +``` http |
| 193 | +HTTP/1.1 200 OK |
| 194 | +Content-Type: application/json |
| 195 | +
|
| 196 | +{ |
| 197 | + "@odata.context": "https://graph.microsoft.com/beta/$metadata#reports/healthMonitoring/alerts/$entity", |
| 198 | + "alertType": "mfaSignInFailure", |
| 199 | + "createdDateTime": "2024-06-19T11:23:44.1234567Z", |
| 200 | + "enrichment": { |
| 201 | + "state": "enriched", |
| 202 | + "impacts": [ |
| 203 | + { |
| 204 | + "@odata.type": "#microsoft.graph.healthMonitoring.userImpactSummary", |
| 205 | + "resourceType": "user", |
| 206 | + "impactedCount": 143, |
| 207 | + "impactedCountLimitExceeded": false, |
| 208 | + "resourceSampling": [] |
| 209 | + }, |
| 210 | + { |
| 211 | + "@odata.type": "#microsoft.graph.healthMonitoring.applicationImpactSummary", |
| 212 | + "resourceType": "application", |
| 213 | + "impactedCount": 1, |
| 214 | + "impactedCountLimitExceeded": true, |
| 215 | + "resourceSampling": [ |
| 216 | + { |
| 217 | + "id": "63c83fa4-d90c-4274-8460-5463e96f1113" |
| 218 | + } |
| 219 | + ] |
| 220 | + } |
| 221 | + ], |
| 222 | + "supportingData": { |
| 223 | + "signIns": "https://graph.microsoft.com/beta/auditLogs/signIns?$filter=((status/errorCode eq 500121) and createdDateTime gt 2024-06-08T11:23:44.1234567Z and createdDateTime le 2024-06-19T11:23:44.1234567Z and (signInEventTypes/any(t:t eq 'interactiveUser' or t eq 'noninteractiveUser')))", |
| 224 | + "audits": "https://graph.microsoft.com/beta/auditLogs/directoryaudits?$filter=(activityDateTime ge 2024-06-08T11:23:44.1234567Z and activityDateTime le 2024-06-19T11:23:44.1234567Z)&$top=50&$orderby=activityDateTime desc" |
| 225 | + } |
| 226 | + } |
| 227 | +} |
| 228 | +``` |
| 229 | + |
| 230 | +> Note: Currently `resourceSampling` only contains `id` of the resource. In the future, it'll be able to show other properties of the resource as well. |
0 commit comments