Elija el permiso o los permisos marcados como con privilegios mínimos para esta API. Use un permiso o permisos con privilegios superiores solo si la aplicación lo requiere. Para obtener más información sobre los permisos delegados y de aplicación, consulte Tipos de permisos. Para obtener más información sobre estos permisos, consulte la referencia de permisos.
Tipo de permiso
Permisos con privilegios mínimos
Permisos con privilegios más altos
Delegado (cuenta profesional o educativa)
IdentityRiskyUser.ReadWrite.All
No disponible.
Delegado (cuenta personal de Microsoft)
No admitida.
No admitida.
Aplicación
IdentityRiskyUser.ReadWrite.All
No disponible.
Importante
En escenarios delegados con cuentas profesionales o educativas, al usuario que ha iniciado sesión se le debe asignar un rol de Microsoft Entra compatible o un rol personalizado con un permiso de rol admitido.
Administrador de seguridad es el rol con privilegios mínimos admitido para esta operación.
Solicitud HTTP
POST /identityProtection/riskyUsers/confirmCompromised
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.IdentityProtection.RiskyUsers.ConfirmCompromised;
var requestBody = new ConfirmCompromisedPostRequestBody
{
UserIds = new List<string>
{
"29f270bb-4d23-4f68-8a57-dc73dc0d4caf",
"20f91ec9-d140-4d90-9cd9-f618587a1471",
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.IdentityProtection.RiskyUsers.ConfirmCompromised.PostAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphidentityprotection "github.com/microsoftgraph/msgraph-sdk-go/identityprotection"
//other-imports
)
requestBody := graphidentityprotection.NewConfirmCompromisedPostRequestBody()
userIds := []string {
"29f270bb-4d23-4f68-8a57-dc73dc0d4caf",
"20f91ec9-d140-4d90-9cd9-f618587a1471",
}
requestBody.SetUserIds(userIds)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.IdentityProtection().RiskyUsers().ConfirmCompromised().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.identityprotection.riskyusers.confirmcompromised.ConfirmCompromisedPostRequestBody confirmCompromisedPostRequestBody = new com.microsoft.graph.identityprotection.riskyusers.confirmcompromised.ConfirmCompromisedPostRequestBody();
LinkedList<String> userIds = new LinkedList<String>();
userIds.add("29f270bb-4d23-4f68-8a57-dc73dc0d4caf");
userIds.add("20f91ec9-d140-4d90-9cd9-f618587a1471");
confirmCompromisedPostRequestBody.setUserIds(userIds);
graphClient.identityProtection().riskyUsers().confirmCompromised().post(confirmCompromisedPostRequestBody);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\IdentityProtection\RiskyUsers\ConfirmCompromised\ConfirmCompromisedPostRequestBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ConfirmCompromisedPostRequestBody();
$requestBody->setUserIds(['29f270bb-4d23-4f68-8a57-dc73dc0d4caf', '20f91ec9-d140-4d90-9cd9-f618587a1471', ]);
$graphServiceClient->identityProtection()->riskyUsers()->confirmCompromised()->post($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.identityprotection.riskyusers.confirm_compromised.confirm_compromised_post_request_body import ConfirmCompromisedPostRequestBody
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ConfirmCompromisedPostRequestBody(
user_ids = [
"29f270bb-4d23-4f68-8a57-dc73dc0d4caf",
"20f91ec9-d140-4d90-9cd9-f618587a1471",
],
)
await graph_client.identity_protection.risky_users.confirm_compromised.post(request_body)