In the request body, supply the values for relevant fields that should be updated. Existing properties that are not included in the request body will maintain 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 is enabled for the tenant.
Response
If successful, this method returns a 204 No Content response code. It does not return anything in the response body.
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 FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new IdentitySecurityDefaultsEnforcementPolicy();
$requestBody->setIsEnabled(false);
$requestResult = $graphServiceClient->policies()->identitySecurityDefaultsEnforcementPolicy()->patch($requestBody);