Les API sous la version /beta dans Microsoft Graph sont susceptibles d’être modifiées. L’utilisation de ces API dans des applications de production n’est pas prise en charge. Pour déterminer si une API est disponible dans v1.0, utilisez le sélecteur Version .
Lisez les propriétés et les relations d’un objet d’alerte de surveillance de l’intégrité Microsoft Entra. L’objet d’alerte retourné contient des informations sur l’état, le type, la date et l’impact de chaque alerte déclenchée au sein de votre locataire.
En plus des autorisations déléguées, l’utilisateur connecté doit appartenir à un rôle Microsoft Entra qui lui permet d’afficher les alertes. Les rôles les moins privilégiés suivants sont pris en charge pour cette opération.
Lecteur général
Administrateur de sécurité
Opérateur de sécurité
Lecteur de sécurité
Administrateur du support technique
Lecteur de rapports
Requête HTTP
GET /reports/healthMonitoring/alerts/{alertId}
Paramètres facultatifs de la requête
Cette méthode prend en charge les paramètres de requête $select et $expandOData pour aider à personnaliser la réponse.
Lorsqu’aucun paramètre de requête n’est $expand ajouté, cette API ne retourne resourceSampling pas de propriété par défaut. Lorsque vous souhaitez récupérer un exemple des ressources impliquées dans le déclenchement de l’alerte pour l’examen de la cause racine, vous pouvez ajouter $expand=enrichment/impacts/microsoft.graph.healthmonitoring.directoryobjectimpactsummary/resourceSampling pour afficher resourceSampling dans directoryObjectImpactSummary.
GET https://graph.microsoft.com/beta/reports/healthMonitoring/alerts/{id}
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Reports.HealthMonitoring.Alerts["{alert-id}"].GetAsync();
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
alerts, err := graphClient.Reports().HealthMonitoring().Alerts().ByAlertId("alert-id").Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.models.healthmonitoring.Alert result = graphClient.reports().healthMonitoring().alerts().byAlertId("{alert-id}").get();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
result = await graph_client.reports.health_monitoring.alerts.by_alert_id('alert-id').get()
GET https://graph.microsoft.com/beta/reports/healthMonitoring/alerts/{id}?$select=alertType, state, createdDateTime, signals
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Reports.HealthMonitoring.Alerts["{alert-id}"].GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Select = new string []{ "alertType"," state"," createdDateTime"," signals" };
});
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphreports "github.com/microsoftgraph/msgraph-beta-sdk-go/reports"
//other-imports
)
requestParameters := &graphreports.HealthMonitoringAlertsItemRequestBuilderGetQueryParameters{
Select: [] string {"alertType"," state"," createdDateTime"," signals"},
}
configuration := &graphreports.HealthMonitoringAlertsItemRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
alerts, err := graphClient.Reports().HealthMonitoring().Alerts().ByAlertId("alert-id").Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.models.healthmonitoring.Alert result = graphClient.reports().healthMonitoring().alerts().byAlertId("{alert-id}").get(requestConfiguration -> {
requestConfiguration.queryParameters.select = new String []{"alertType", " state", " createdDateTime", " signals"};
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.reports.health_monitoring.alerts.item.alert_item_request_builder import AlertItemRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
query_params = AlertItemRequestBuilder.AlertItemRequestBuilderGetQueryParameters(
select = ["alertType"," state"," createdDateTime"," signals"],
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.reports.health_monitoring.alerts.by_alert_id('alert-id').get(request_configuration = request_configuration)
GET https://graph.microsoft.com/beta/reports/healthMonitoring/alerts/{id}?$expand=enrichment/impacts/microsoft.graph.healthmonitoring.directoryobjectimpactsummary/resourceSampling&$select=alertType, createdDateTime, enrichment'
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Reports.HealthMonitoring.Alerts["{alert-id}"].GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Expand = new string []{ "enrichment/impacts/microsoft.graph.healthmonitoring.directoryobjectimpactsummary/resourceSampling" };
requestConfiguration.QueryParameters.Select = new string []{ "alertType"," createdDateTime"," enrichment'" };
});
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphreports "github.com/microsoftgraph/msgraph-beta-sdk-go/reports"
//other-imports
)
requestParameters := &graphreports.HealthMonitoringAlertsItemRequestBuilderGetQueryParameters{
Expand: [] string {"enrichment/impacts/microsoft.graph.healthmonitoring.directoryobjectimpactsummary/resourceSampling"},
Select: [] string {"alertType"," createdDateTime"," enrichment'"},
}
configuration := &graphreports.HealthMonitoringAlertsItemRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
alerts, err := graphClient.Reports().HealthMonitoring().Alerts().ByAlertId("alert-id").Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.models.healthmonitoring.Alert result = graphClient.reports().healthMonitoring().alerts().byAlertId("{alert-id}").get(requestConfiguration -> {
requestConfiguration.queryParameters.expand = new String []{"enrichment/impacts/microsoft.graph.healthmonitoring.directoryobjectimpactsummary/resourceSampling"};
requestConfiguration.queryParameters.select = new String []{"alertType", " createdDateTime", " enrichment'"};
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.reports.health_monitoring.alerts.item.alert_item_request_builder import AlertItemRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
query_params = AlertItemRequestBuilder.AlertItemRequestBuilderGetQueryParameters(
expand = ["enrichment/impacts/microsoft.graph.healthmonitoring.directoryobjectimpactsummary/resourceSampling"],
select = ["alertType"," createdDateTime"," enrichment'"],
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.reports.health_monitoring.alerts.by_alert_id('alert-id').get(request_configuration = request_configuration)
Remarque : l’objet de réponse affiché ci-après peut être raccourci pour plus de lisibilité.
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#reports/healthMonitoring/alerts/$entity",
"alertType": "mfaSignInFailure",
"createdDateTime": "2024-06-19T11:23:44.1234567Z",
"enrichment": {
"state": "enriched",
"impacts": [
{
"@odata.type": "#microsoft.graph.healthMonitoring.userImpactSummary",
"resourceType": "user",
"impactedCount": 143,
"impactedCountLimitExceeded": false,
"resourceSampling": []
},
{
"@odata.type": "#microsoft.graph.healthMonitoring.applicationImpactSummary",
"resourceType": "application",
"impactedCount": 1,
"impactedCountLimitExceeded": true,
"resourceSampling": [
{
"id": "63c83fa4-d90c-4274-8460-5463e96f1113"
}
]
}
],
"supportingData": {
"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')))",
"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"
}
}
}
Remarque : contient actuellement resourceSampling uniquement id de la ressource. À l’avenir, il sera également en mesure d’afficher d’autres propriétés de la ressource.