// 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)