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.
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := graphmodels.NewIdentitySecurityDefaultsEnforcementPolicy()
isEnabled := false
requestBody.SetIsEnabled(&isEnabled)
result, err := graphClient.Policies().IdentitySecurityDefaultsEnforcementPolicy().Patch(context.Background(), requestBody, nil)
<?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);