In the request body, supply the values for relevant fields that should be updated. Existing properties that aren't included in the request body maintains their previous values or be recalculated based on changes to other property values. For best performance, don't include existing values that haven't changed.
Property
Type
Description
isEnabled
Boolean
If set to true, Azure Active Directory security defaults are enabled for the tenant.
Response
If successful, this method returns a 204 No Content response code. It doesn't return anything in the response body.
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new IdentitySecurityDefaultsEnforcementPolicy
{
IsEnabled = false,
};
var result = await graphClient.Policies.IdentitySecurityDefaultsEnforcementPolicy.PatchAsync(requestBody);
<?php
// THIS SNIPPET IS A PREVIEW VERSION OF THE SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new IdentitySecurityDefaultsEnforcementPolicy();
$requestBody->setIsEnabled(false);
$result = $graphServiceClient->policies()->identitySecurityDefaultsEnforcementPolicy()->patch($requestBody)->wait();
# THE PYTHON SDK IS IN PREVIEW. FOR NON-PRODUCTION USE ONLY
graph_client = GraphServiceClient(request_adapter)
request_body = IdentitySecurityDefaultsEnforcementPolicy(
is_enabled = False,
)
result = await graph_client.policies.identity_security_default_enforcement_policy.patch(body = request_body)