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 .
Obtenez la liste des objets d’alerte de surveillance de l’intégrité Microsoft Entra et leurs propriétés des 30 derniers jours.
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
Paramètres facultatifs de la requête
Cette méthode prend en charge les $countparamètres de requête , $filter$orderby$expand, , $select, et$top OData pour vous aider à personnaliser la réponse.
$skip n’est pas pris en charge. Les tailles de page par défaut et maximales sont de 100 objets d’alerte.
$orderby est pris en charge uniquement sur la createdDateTime propriété .
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
// 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.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().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.AlertCollectionResponse result = graphClient.reports().healthMonitoring().alerts().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.get()
GET https://graph.microsoft.com/beta/reports/healthMonitoring/alerts?$filter=state eq microsoft.graph.healthmonitoring.alertState'active'&$select=id, alertType
// 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.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Filter = "state eq microsoft.graph.healthmonitoring.alertState'active'";
requestConfiguration.QueryParameters.Select = new string []{ "id"," alertType" };
});
// 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
)
requestFilter := "state eq microsoft.graph.healthmonitoring.alertState'active'"
requestParameters := &graphreports.HealthMonitoringAlertsRequestBuilderGetQueryParameters{
Filter: &requestFilter,
Select: [] string {"id"," alertType"},
}
configuration := &graphreports.HealthMonitoringAlertsRequestBuilderGetRequestConfiguration{
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().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.AlertCollectionResponse result = graphClient.reports().healthMonitoring().alerts().get(requestConfiguration -> {
requestConfiguration.queryParameters.filter = "state eq microsoft.graph.healthmonitoring.alertState'active'";
requestConfiguration.queryParameters.select = new String []{"id", " alertType"};
});
# 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.alerts_request_builder import AlertsRequestBuilder
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 = AlertsRequestBuilder.AlertsRequestBuilderGetQueryParameters(
filter = "state eq microsoft.graph.healthmonitoring.alertState'active'",
select = ["id"," alertType"],
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.reports.health_monitoring.alerts.get(request_configuration = request_configuration)
GET https://graph.microsoft.com/beta/reports/healthMonitoring/alerts?$filter=createdDateTime gt 2024-06-10T11:23:44Z&$select=id, alertType, createdDateTime, state
// 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.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Filter = "createdDateTime gt 2024-06-10T11:23:44Z";
requestConfiguration.QueryParameters.Select = new string []{ "id"," alertType"," createdDateTime"," state" };
});
// 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
)
requestFilter := "createdDateTime gt 2024-06-10T11:23:44Z"
requestParameters := &graphreports.HealthMonitoringAlertsRequestBuilderGetQueryParameters{
Filter: &requestFilter,
Select: [] string {"id"," alertType"," createdDateTime"," state"},
}
configuration := &graphreports.HealthMonitoringAlertsRequestBuilderGetRequestConfiguration{
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().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.AlertCollectionResponse result = graphClient.reports().healthMonitoring().alerts().get(requestConfiguration -> {
requestConfiguration.queryParameters.filter = "createdDateTime gt 2024-06-10T11:23:44Z";
requestConfiguration.queryParameters.select = new String []{"id", " alertType", " createdDateTime", " state"};
});
# 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.alerts_request_builder import AlertsRequestBuilder
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 = AlertsRequestBuilder.AlertsRequestBuilderGetQueryParameters(
filter = "createdDateTime gt 2024-06-10T11:23:44Z",
select = ["id"," alertType"," createdDateTime"," state"],
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.reports.health_monitoring.alerts.get(request_configuration = request_configuration)
GET https://graph.microsoft.com/beta/reports/healthMonitoring/alerts?$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.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.HealthMonitoringAlertsRequestBuilderGetQueryParameters{
Expand: [] string {"enrichment/impacts/microsoft.graph.healthmonitoring.directoryobjectimpactsummary/resourceSampling"},
Select: [] string {"alertType"," createdDateTime"," enrichment'"},
}
configuration := &graphreports.HealthMonitoringAlertsRequestBuilderGetRequestConfiguration{
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().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.AlertCollectionResponse result = graphClient.reports().healthMonitoring().alerts().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.alerts_request_builder import AlertsRequestBuilder
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 = AlertsRequestBuilder.AlertsRequestBuilderGetQueryParameters(
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.get(request_configuration = request_configuration)